pytest-expecter 3.0__tar.gz → 3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest-expecter-3.0 → pytest_expecter-3.1}/PKG-INFO +12 -12
- {pytest-expecter-3.0 → pytest_expecter-3.1}/README.md +3 -3
- {pytest-expecter-3.0 → pytest_expecter-3.1}/expecter/__init__.py +45 -40
- {pytest-expecter-3.0 → pytest_expecter-3.1}/expecter/plugin.py +1 -1
- {pytest-expecter-3.0 → pytest_expecter-3.1}/pyproject.toml +52 -18
- pytest-expecter-3.0/setup.py +0 -30
- {pytest-expecter-3.0 → pytest_expecter-3.1}/LICENSE.md +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-expecter
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.1
|
|
4
4
|
Summary: Better testing with expecter and pytest.
|
|
5
|
-
Home-page: https://pypi.org/project/pytest-expecter
|
|
6
5
|
License: BSD
|
|
6
|
+
License-File: LICENSE.md
|
|
7
7
|
Keywords: pytest,testing
|
|
8
8
|
Author: Jace Browning
|
|
9
9
|
Author-email: jacebrowning@gmail.com
|
|
10
|
-
Requires-Python: >=3.
|
|
10
|
+
Requires-Python: >=3.10,<4.0
|
|
11
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
12
12
|
Classifier: Environment :: Plugins
|
|
13
13
|
Classifier: Framework :: Pytest
|
|
@@ -17,14 +17,14 @@ Classifier: License :: Other/Proprietary License
|
|
|
17
17
|
Classifier: Operating System :: OS Independent
|
|
18
18
|
Classifier: Programming Language :: Python
|
|
19
19
|
Classifier: Programming Language :: Python :: 3
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
22
20
|
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
-
Classifier: Programming Language :: Python :: 3.
|
|
24
|
-
Classifier: Programming Language :: Python :: 3.
|
|
25
|
-
Classifier: Programming Language :: Python :: 3.
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
26
25
|
Classifier: Topic :: Software Development :: Testing
|
|
27
26
|
Project-URL: Documentation, https://pytest-expecter.readthedocs.io
|
|
27
|
+
Project-URL: Homepage, https://pypi.org/project/pytest-expecter
|
|
28
28
|
Project-URL: Repository, https://github.com/jacebrowning/pytest-expecter
|
|
29
29
|
Description-Content-Type: text/markdown
|
|
30
30
|
|
|
@@ -32,13 +32,13 @@ Description-Content-Type: text/markdown
|
|
|
32
32
|
|
|
33
33
|
A `pytest` plugin based on [garybernhardt/expecter](https://github.com/garybernhardt/expecter) to write expressive tests.
|
|
34
34
|
|
|
35
|
-
[](https://github.com/jacebrowning/pytest-expecter/actions/workflows/main.yml)
|
|
36
36
|
[](https://coveralls.io/r/jacebrowning/pytest-expecter)
|
|
37
37
|
[](https://pypi.org/project/pytest-expecter)
|
|
38
38
|
[](https://pypi.org/project/pytest-expecter)
|
|
39
39
|
[](https://pypistats.org/packages/pytest-expecter)
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
## Quick Start
|
|
42
42
|
|
|
43
43
|
With this plugin you can write tests (optionally using [pytest-describe](https://github.com/pytest-dev/pytest-describe)) like this:
|
|
44
44
|
|
|
@@ -66,7 +66,7 @@ test_foobar.py:7: AssertionError
|
|
|
66
66
|
================ 1 failed, 1 passed in 2.67 seconds ================
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
## Installation
|
|
70
70
|
|
|
71
71
|
Install it directly into an activated virtual environment:
|
|
72
72
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
A `pytest` plugin based on [garybernhardt/expecter](https://github.com/garybernhardt/expecter) to write expressive tests.
|
|
4
4
|
|
|
5
|
-
[](https://github.com/jacebrowning/pytest-expecter/actions/workflows/main.yml)
|
|
6
6
|
[](https://coveralls.io/r/jacebrowning/pytest-expecter)
|
|
7
7
|
[](https://pypi.org/project/pytest-expecter)
|
|
8
8
|
[](https://pypi.org/project/pytest-expecter)
|
|
9
9
|
[](https://pypistats.org/packages/pytest-expecter)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Quick Start
|
|
12
12
|
|
|
13
13
|
With this plugin you can write tests (optionally using [pytest-describe](https://github.com/pytest-dev/pytest-describe)) like this:
|
|
14
14
|
|
|
@@ -36,7 +36,7 @@ test_foobar.py:7: AssertionError
|
|
|
36
36
|
================ 1 failed, 1 passed in 2.67 seconds ================
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
## Installation
|
|
40
40
|
|
|
41
41
|
Install it directly into an activated virtual environment:
|
|
42
42
|
|
|
@@ -12,21 +12,20 @@ import sys
|
|
|
12
12
|
from collections import OrderedDict
|
|
13
13
|
from importlib.metadata import PackageNotFoundError, version
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
try:
|
|
17
|
-
__version__ = version(
|
|
16
|
+
__version__ = version("pytest-expecter")
|
|
18
17
|
except PackageNotFoundError:
|
|
19
|
-
__version__ =
|
|
18
|
+
__version__ = "(local)"
|
|
20
19
|
|
|
21
20
|
|
|
22
|
-
__all__ = [
|
|
21
|
+
__all__ = ["expect"]
|
|
23
22
|
|
|
24
23
|
|
|
25
24
|
class Anything:
|
|
26
25
|
"""Placeholder value to ignore uninteresting response data."""
|
|
27
26
|
|
|
28
27
|
def __repr__(self):
|
|
29
|
-
return
|
|
28
|
+
return "<anything>"
|
|
30
29
|
|
|
31
30
|
def __eq__(self, other):
|
|
32
31
|
return True
|
|
@@ -71,7 +70,7 @@ class expect:
|
|
|
71
70
|
|
|
72
71
|
def __eq__(self, other):
|
|
73
72
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
74
|
-
msg =
|
|
73
|
+
msg = "Expected %s but got %s" % (repr(other), repr(self._actual))
|
|
75
74
|
if isinstance(other, str) and isinstance(self._actual, str):
|
|
76
75
|
msg += normalized_diff(other, self._actual)
|
|
77
76
|
elif len(repr(self._actual)) > self.MIN_DIFF_SIZE:
|
|
@@ -81,14 +80,14 @@ class expect:
|
|
|
81
80
|
|
|
82
81
|
def __ne__(self, other):
|
|
83
82
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
84
|
-
assert self._actual != other,
|
|
83
|
+
assert self._actual != other, "Expected anything except %s but got it" % repr(
|
|
85
84
|
self._actual
|
|
86
85
|
)
|
|
87
86
|
return self
|
|
88
87
|
|
|
89
88
|
def __lt__(self, other):
|
|
90
89
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
91
|
-
assert self._actual < other,
|
|
90
|
+
assert self._actual < other, "Expected something less than %s but got %s" % (
|
|
92
91
|
repr(other),
|
|
93
92
|
repr(self._actual),
|
|
94
93
|
)
|
|
@@ -96,7 +95,7 @@ class expect:
|
|
|
96
95
|
|
|
97
96
|
def __gt__(self, other):
|
|
98
97
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
99
|
-
assert self._actual > other,
|
|
98
|
+
assert self._actual > other, "Expected something greater than %s but got %s" % (
|
|
100
99
|
repr(other),
|
|
101
100
|
repr(self._actual),
|
|
102
101
|
)
|
|
@@ -104,27 +103,31 @@ class expect:
|
|
|
104
103
|
|
|
105
104
|
def __le__(self, other):
|
|
106
105
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
107
|
-
assert
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
assert (
|
|
107
|
+
self._actual <= other
|
|
108
|
+
), "Expected something less than or equal to %s but got %s" % (
|
|
109
|
+
repr(other),
|
|
110
|
+
repr(self._actual),
|
|
110
111
|
)
|
|
111
112
|
return self
|
|
112
113
|
|
|
113
114
|
def __ge__(self, other):
|
|
114
115
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
115
|
-
assert
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
assert (
|
|
117
|
+
self._actual >= other
|
|
118
|
+
), "Expected something greater than or equal to %s but got %s" % (
|
|
119
|
+
repr(other),
|
|
120
|
+
repr(self._actual),
|
|
118
121
|
)
|
|
119
122
|
return self
|
|
120
123
|
|
|
121
124
|
def __repr__(self):
|
|
122
|
-
return
|
|
125
|
+
return "expect(%s)" % repr(self._actual)
|
|
123
126
|
|
|
124
127
|
def is_(self, other):
|
|
125
128
|
"""Ensure that ``other`` is identical to the actual value."""
|
|
126
129
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
127
|
-
label =
|
|
130
|
+
label = "condition" if isinstance(self._actual, bool) else "value"
|
|
128
131
|
assert self._actual is other, "Expected %s to be %s, but it was %s" % (
|
|
129
132
|
label,
|
|
130
133
|
repr(other),
|
|
@@ -135,7 +138,7 @@ class expect:
|
|
|
135
138
|
def is_not(self, other):
|
|
136
139
|
"""Ensure that ``other`` is not identical to the actual value."""
|
|
137
140
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
138
|
-
label =
|
|
141
|
+
label = "condition" if isinstance(self._actual, bool) else "value"
|
|
139
142
|
assert self._actual is not other, "Expected %s to not be %s, but it was" % (
|
|
140
143
|
label,
|
|
141
144
|
repr(other),
|
|
@@ -150,12 +153,14 @@ class expect:
|
|
|
150
153
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
151
154
|
if isinstance(expected_cls, tuple):
|
|
152
155
|
cls_name = [c.__name__ for c in expected_cls]
|
|
153
|
-
cls_name =
|
|
156
|
+
cls_name = " or ".join(cls_name) # type: ignore
|
|
154
157
|
else:
|
|
155
158
|
cls_name = expected_cls.__name__
|
|
156
|
-
assert isinstance(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
+
assert isinstance(
|
|
160
|
+
self._actual, expected_cls
|
|
161
|
+
), "Expected an instance of %s but got an instance of %s" % (
|
|
162
|
+
cls_name,
|
|
163
|
+
self._actual.__class__.__name__,
|
|
159
164
|
)
|
|
160
165
|
|
|
161
166
|
def contains(self, other):
|
|
@@ -165,7 +170,7 @@ class expect:
|
|
|
165
170
|
"""
|
|
166
171
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
167
172
|
|
|
168
|
-
if isinstance(self._actual, str) and
|
|
173
|
+
if isinstance(self._actual, str) and "\n" in self._actual:
|
|
169
174
|
msg = "Given text:\n\n%s\n\nExpected to contain %s but didn't" % (
|
|
170
175
|
self._actual.strip(),
|
|
171
176
|
repr(other),
|
|
@@ -182,7 +187,7 @@ class expect:
|
|
|
182
187
|
"""Same as ``contains` but ignoring case."""
|
|
183
188
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
184
189
|
|
|
185
|
-
if isinstance(self._actual, str) and
|
|
190
|
+
if isinstance(self._actual, str) and "\n" in self._actual:
|
|
186
191
|
msg = (
|
|
187
192
|
"Given text:\n\n%s\n\nExpected to contain %s (ignoring case) but didn't"
|
|
188
193
|
% (self._actual.strip(), repr(other))
|
|
@@ -202,7 +207,7 @@ class expect:
|
|
|
202
207
|
"""Same as ``contains`` but with alternate phrasing."""
|
|
203
208
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
204
209
|
|
|
205
|
-
if isinstance(self._actual, str) and
|
|
210
|
+
if isinstance(self._actual, str) and "\n" in self._actual:
|
|
206
211
|
msg = "Given text:\n\n%s\n\nExpected to include %s but didn't" % (
|
|
207
212
|
self._actual.strip(),
|
|
208
213
|
repr(other),
|
|
@@ -219,7 +224,7 @@ class expect:
|
|
|
219
224
|
"""Opposite of ``contains``."""
|
|
220
225
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
221
226
|
|
|
222
|
-
if isinstance(self._actual, str) and
|
|
227
|
+
if isinstance(self._actual, str) and "\n" in self._actual:
|
|
223
228
|
msg = "Given text:\n\n%s\n\nExpected not to contain %s but did" % (
|
|
224
229
|
self._actual.strip(),
|
|
225
230
|
repr(other),
|
|
@@ -236,7 +241,7 @@ class expect:
|
|
|
236
241
|
"""Opposite of ``contains`` with alternate phrasing."""
|
|
237
242
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
238
243
|
|
|
239
|
-
if isinstance(self._actual, str) and
|
|
244
|
+
if isinstance(self._actual, str) and "\n" in self._actual:
|
|
240
245
|
msg = "Given text:\n\n%s\n\nExpected to exclude %s but didn't" % (
|
|
241
246
|
self._actual.strip(),
|
|
242
247
|
repr(other),
|
|
@@ -253,7 +258,7 @@ class expect:
|
|
|
253
258
|
"""Same as ``excludes`` but ignoring case."""
|
|
254
259
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
255
260
|
|
|
256
|
-
if isinstance(self._actual, str) and
|
|
261
|
+
if isinstance(self._actual, str) and "\n" in self._actual:
|
|
257
262
|
msg = (
|
|
258
263
|
"Given text:\n\n%s\n\nExpected to exclude %s (ignoring case) but didn't"
|
|
259
264
|
% (self._actual.strip(), repr(other))
|
|
@@ -273,7 +278,7 @@ class expect:
|
|
|
273
278
|
"""Ensure that ``other`` starts the actual value."""
|
|
274
279
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
275
280
|
|
|
276
|
-
if isinstance(self._actual, str) and
|
|
281
|
+
if isinstance(self._actual, str) and "\n" in self._actual:
|
|
277
282
|
msg = "Given text:\n\n%s\n\nExpected to start with %s but didn't" % (
|
|
278
283
|
self._actual.strip(),
|
|
279
284
|
repr(other),
|
|
@@ -290,7 +295,7 @@ class expect:
|
|
|
290
295
|
"""Same as ``startswith`` but ignoring case."""
|
|
291
296
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
292
297
|
|
|
293
|
-
if isinstance(self._actual, str) and
|
|
298
|
+
if isinstance(self._actual, str) and "\n" in self._actual:
|
|
294
299
|
msg = (
|
|
295
300
|
"Given text:\n\n%s\n\nExpected to start with %s (ignoring case) but didn't"
|
|
296
301
|
% (self._actual.strip(), repr(other))
|
|
@@ -307,7 +312,7 @@ class expect:
|
|
|
307
312
|
"""Ensure that ``other`` ends the actual value."""
|
|
308
313
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
309
314
|
|
|
310
|
-
if isinstance(self._actual, str) and
|
|
315
|
+
if isinstance(self._actual, str) and "\n" in self._actual:
|
|
311
316
|
msg = "Given text:\n\n%s\n\nExpected to end with %s but didn't" % (
|
|
312
317
|
self._actual.strip(),
|
|
313
318
|
repr(other),
|
|
@@ -324,7 +329,7 @@ class expect:
|
|
|
324
329
|
"""Same as ``endswith`` but ignoring case."""
|
|
325
330
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
326
331
|
|
|
327
|
-
if isinstance(self._actual, str) and
|
|
332
|
+
if isinstance(self._actual, str) and "\n" in self._actual:
|
|
328
333
|
msg = (
|
|
329
334
|
"Given text:\n\n%s\n\nExpected to end with %s (ignoring case) but didn't"
|
|
330
335
|
% (self._actual.strip(), repr(other))
|
|
@@ -378,7 +383,7 @@ class _RaisesExpectation:
|
|
|
378
383
|
success = not exc_type
|
|
379
384
|
if success:
|
|
380
385
|
raise AssertionError(
|
|
381
|
-
|
|
386
|
+
"Expected an exception of type %s but got none"
|
|
382
387
|
% self._exception_class.__name__
|
|
383
388
|
)
|
|
384
389
|
return self.validate_failure(exc_type, exc_value)
|
|
@@ -425,22 +430,22 @@ class _CustomExpectation:
|
|
|
425
430
|
def enforce(self, *args, **kwargs):
|
|
426
431
|
__tracebackhide__ = _hidetraceback() # pylint: disable=unused-variable
|
|
427
432
|
if not self._predicate(self._actual, *args, **kwargs):
|
|
428
|
-
predicate_name = self._predicate.__name__.replace(
|
|
433
|
+
predicate_name = self._predicate.__name__.replace("_", " ")
|
|
429
434
|
raise AssertionError(
|
|
430
|
-
|
|
435
|
+
"Expected that %s %s, but %s"
|
|
431
436
|
% (repr(self._actual), predicate_name, self._negative_verb())
|
|
432
437
|
)
|
|
433
438
|
|
|
434
439
|
def _negative_verb(self):
|
|
435
440
|
# XXX: getting name in multiple places
|
|
436
|
-
first_word_in_predicate = self._predicate.__name__.split(
|
|
441
|
+
first_word_in_predicate = self._predicate.__name__.split("_")[0]
|
|
437
442
|
try:
|
|
438
443
|
return self.negative_verbs[first_word_in_predicate]
|
|
439
444
|
except KeyError:
|
|
440
445
|
return "got False"
|
|
441
446
|
|
|
442
447
|
|
|
443
|
-
_custom_expectations = {}
|
|
448
|
+
_custom_expectations: dict[str, object] = {}
|
|
444
449
|
|
|
445
450
|
|
|
446
451
|
def add_expectation(predicate):
|
|
@@ -477,10 +482,10 @@ def normalize(value):
|
|
|
477
482
|
|
|
478
483
|
|
|
479
484
|
def normalized_diff(other, actual):
|
|
480
|
-
diff = difflib.unified_diff(other.splitlines(), actual.splitlines(), lineterm=
|
|
485
|
+
diff = difflib.unified_diff(other.splitlines(), actual.splitlines(), lineterm="")
|
|
481
486
|
diff = list(diff) # type: ignore
|
|
482
|
-
return
|
|
487
|
+
return "\n".join(["\nDiff:"] + diff[2:]) # type: ignore
|
|
483
488
|
|
|
484
489
|
|
|
485
490
|
def _hidetraceback():
|
|
486
|
-
return os.getenv(
|
|
491
|
+
return os.getenv("EXPECTER_HIDETRACEBACK")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
|
|
3
3
|
name = "pytest-expecter"
|
|
4
|
-
version = "3.
|
|
4
|
+
version = "3.1"
|
|
5
5
|
description = "Better testing with expecter and pytest."
|
|
6
6
|
|
|
7
7
|
license = "BSD"
|
|
@@ -23,9 +23,11 @@ classifiers = [
|
|
|
23
23
|
"License :: OSI Approved :: BSD License",
|
|
24
24
|
"Operating System :: OS Independent",
|
|
25
25
|
"Programming Language :: Python",
|
|
26
|
-
"Programming Language :: Python :: 3.8",
|
|
27
|
-
"Programming Language :: Python :: 3.9",
|
|
28
26
|
"Programming Language :: Python :: 3.10",
|
|
27
|
+
"Programming Language :: Python :: 3.11",
|
|
28
|
+
"Programming Language :: Python :: 3.12",
|
|
29
|
+
"Programming Language :: Python :: 3.13",
|
|
30
|
+
"Programming Language :: Python :: 3.14",
|
|
29
31
|
"Topic :: Software Development :: Testing",
|
|
30
32
|
]
|
|
31
33
|
|
|
@@ -35,51 +37,83 @@ packages = [
|
|
|
35
37
|
|
|
36
38
|
[tool.poetry.dependencies]
|
|
37
39
|
|
|
38
|
-
python = "^3.
|
|
40
|
+
python = "^3.10"
|
|
39
41
|
|
|
40
|
-
[tool.poetry.dev
|
|
42
|
+
[tool.poetry.group.dev.dependencies]
|
|
41
43
|
|
|
42
44
|
# Formatters
|
|
43
|
-
black = "
|
|
44
|
-
isort = "
|
|
45
|
+
black = ">=22.1,<27.0"
|
|
46
|
+
isort = "^5.10"
|
|
45
47
|
|
|
46
48
|
# Linters
|
|
47
49
|
mypy = "*"
|
|
48
50
|
pydocstyle = "*"
|
|
49
|
-
pylint = "
|
|
51
|
+
pylint = ">=2.15,<4.1"
|
|
50
52
|
types-setuptools = "*"
|
|
51
53
|
|
|
52
54
|
# Testing
|
|
53
|
-
pytest = "
|
|
55
|
+
pytest = ">=8.3.5,<10.0.0"
|
|
54
56
|
pytest-cov = "*"
|
|
55
|
-
pytest-describe = "
|
|
57
|
+
pytest-describe = ">=2.2,<4.0"
|
|
56
58
|
pytest-random = "*"
|
|
57
59
|
freezegun = "*"
|
|
58
60
|
|
|
59
61
|
# Reports
|
|
60
|
-
coveragespace = "
|
|
62
|
+
coveragespace = "*"
|
|
61
63
|
|
|
62
64
|
# Documentation
|
|
63
|
-
mkdocs = "^1.
|
|
65
|
+
mkdocs = "^1.6.1"
|
|
64
66
|
pygments = "*"
|
|
65
|
-
jinja2 = "
|
|
67
|
+
jinja2 = ">=3.0.3,<3.2.0"
|
|
66
68
|
|
|
67
69
|
# Tooling
|
|
68
70
|
pyinstaller = "*"
|
|
69
71
|
sniffer = "*"
|
|
70
|
-
MacFSEvents = { version = "*", platform = "darwin" }
|
|
72
|
+
MacFSEvents = { version = "*", platform = "darwin", python = "<3.13" }
|
|
71
73
|
pync = { version = "*", platform = "darwin" }
|
|
72
74
|
|
|
75
|
+
[tool.poetry.requires-plugins]
|
|
76
|
+
|
|
77
|
+
poetry-plugin-export = ">=1.8"
|
|
78
|
+
|
|
73
79
|
[tool.poetry.plugins.pytest11]
|
|
74
80
|
|
|
75
81
|
"pytest-expecter" = "expecter.plugin"
|
|
76
82
|
|
|
77
83
|
[tool.black]
|
|
78
84
|
|
|
79
|
-
|
|
80
|
-
|
|
85
|
+
quiet = true
|
|
86
|
+
|
|
87
|
+
[tool.isort]
|
|
88
|
+
|
|
89
|
+
profile = "black"
|
|
90
|
+
|
|
91
|
+
[tool.mypy]
|
|
92
|
+
|
|
93
|
+
ignore_missing_imports = true
|
|
94
|
+
no_implicit_optional = true
|
|
95
|
+
check_untyped_defs = true
|
|
96
|
+
|
|
97
|
+
cache_dir = ".cache/mypy/"
|
|
98
|
+
|
|
99
|
+
[tool.pytest.ini_options]
|
|
100
|
+
|
|
101
|
+
addopts = """
|
|
102
|
+
--strict-markers
|
|
103
|
+
|
|
104
|
+
-r sxX
|
|
105
|
+
--show-capture=log
|
|
106
|
+
|
|
107
|
+
--cov-report=html
|
|
108
|
+
--cov-report=term-missing:skip-covered
|
|
109
|
+
--no-cov-on-fail
|
|
110
|
+
"""
|
|
111
|
+
|
|
112
|
+
cache_dir = ".cache/pytest/"
|
|
113
|
+
|
|
114
|
+
markers = []
|
|
81
115
|
|
|
82
116
|
[build-system]
|
|
83
117
|
|
|
84
|
-
requires = ["poetry>=0
|
|
85
|
-
build-backend = "poetry.masonry.api"
|
|
118
|
+
requires = ["poetry-core>=2.4.0"]
|
|
119
|
+
build-backend = "poetry.core.masonry.api"
|
pytest-expecter-3.0/setup.py
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
from setuptools import setup
|
|
3
|
-
|
|
4
|
-
packages = \
|
|
5
|
-
['expecter']
|
|
6
|
-
|
|
7
|
-
package_data = \
|
|
8
|
-
{'': ['*']}
|
|
9
|
-
|
|
10
|
-
entry_points = \
|
|
11
|
-
{'pytest11': ['pytest-expecter = expecter.plugin']}
|
|
12
|
-
|
|
13
|
-
setup_kwargs = {
|
|
14
|
-
'name': 'pytest-expecter',
|
|
15
|
-
'version': '3.0',
|
|
16
|
-
'description': 'Better testing with expecter and pytest.',
|
|
17
|
-
'long_description': '# Overview\n\nA `pytest` plugin based on [garybernhardt/expecter](https://github.com/garybernhardt/expecter) to write expressive tests.\n\n[](https://travis-ci.org/jacebrowning/pytest-expecter)\n[](https://coveralls.io/r/jacebrowning/pytest-expecter)\n[](https://pypi.org/project/pytest-expecter)\n[](https://pypi.org/project/pytest-expecter)\n[](https://pypistats.org/packages/pytest-expecter)\n\n# Quick Start\n\nWith this plugin you can write tests (optionally using [pytest-describe](https://github.com/pytest-dev/pytest-describe)) like this:\n\n```python\ndef describe_foobar():\n\n def it_can_pass(expect):\n expect(2 + 3) == 5\n\n def it_can_fail(expect):\n expect(2 + 3) == 6\n```\n\nand get output like this:\n\n```python\n============================= FAILURES =============================\n___________________ describe_foobar.it_can_fail ____________________\n\n def it_can_fail(expect):\n> expect(2 + 3) == 6\nE AssertionError: Expected 6 but got 5\n\ntest_foobar.py:7: AssertionError\n================ 1 failed, 1 passed in 2.67 seconds ================\n```\n\n# Installation\n\nInstall it directly into an activated virtual environment:\n\n```\n$ pip install pytest-expecter\n```\n\nor add it to your [Poetry](https://python-poetry.org/docs/) project:\n\n```\n$ poetry add pytest-expecter\n```\n',
|
|
18
|
-
'author': 'Jace Browning',
|
|
19
|
-
'author_email': 'jacebrowning@gmail.com',
|
|
20
|
-
'maintainer': 'None',
|
|
21
|
-
'maintainer_email': 'None',
|
|
22
|
-
'url': 'https://pypi.org/project/pytest-expecter',
|
|
23
|
-
'packages': packages,
|
|
24
|
-
'package_data': package_data,
|
|
25
|
-
'entry_points': entry_points,
|
|
26
|
-
'python_requires': '>=3.8,<4.0',
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
setup(**setup_kwargs)
|
|
File without changes
|