pytest-pyspec 0.8.3__py3-none-any.whl → 0.10.0__py3-none-any.whl
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.
Potentially problematic release.
This version of pytest-pyspec might be problematic. Click here for more details.
- pytest_pyspec/item.py +4 -2
- pytest_pyspec/plugin.py +4 -1
- {pytest_pyspec-0.8.3.dist-info → pytest_pyspec-0.10.0.dist-info}/METADATA +2 -2
- pytest_pyspec-0.10.0.dist-info/RECORD +9 -0
- pytest_pyspec-0.8.3.dist-info/RECORD +0 -9
- {pytest_pyspec-0.8.3.dist-info → pytest_pyspec-0.10.0.dist-info}/LICENSE +0 -0
- {pytest_pyspec-0.8.3.dist-info → pytest_pyspec-0.10.0.dist-info}/WHEEL +0 -0
- {pytest_pyspec-0.8.3.dist-info → pytest_pyspec-0.10.0.dist-info}/entry_points.txt +0 -0
pytest_pyspec/item.py
CHANGED
|
@@ -117,6 +117,7 @@ class ItemFactory:
|
|
|
117
117
|
if container:
|
|
118
118
|
container.add(test_item)
|
|
119
119
|
|
|
120
|
+
item.name = test_item.description
|
|
120
121
|
return test_item
|
|
121
122
|
|
|
122
123
|
|
|
@@ -128,15 +129,16 @@ class ContainerFactory:
|
|
|
128
129
|
containers = self._create_containers(item)
|
|
129
130
|
if not containers:
|
|
130
131
|
return None
|
|
131
|
-
|
|
132
|
+
|
|
132
133
|
return containers[-1]
|
|
133
134
|
|
|
134
|
-
def _create_unique_container(self, item):
|
|
135
|
+
def _create_unique_container(self, item: pytest.Item):
|
|
135
136
|
if item not in self.containers:
|
|
136
137
|
container = Container(item)
|
|
137
138
|
self.containers[item] = container
|
|
138
139
|
|
|
139
140
|
container = self.containers.get(item)
|
|
141
|
+
item.name = container.description
|
|
140
142
|
return container
|
|
141
143
|
|
|
142
144
|
def _create_containers(self, item):
|
pytest_pyspec/plugin.py
CHANGED
|
@@ -33,7 +33,10 @@ def pytest_configure(config: pytest.Config):
|
|
|
33
33
|
|
|
34
34
|
test_key = pytest.StashKey[Test]()
|
|
35
35
|
prev_test_key = pytest.StashKey[Test]()
|
|
36
|
-
def pytest_collection_modifyitems(
|
|
36
|
+
def pytest_collection_modifyitems(
|
|
37
|
+
session: pytest.Session,
|
|
38
|
+
config: pytest.Config,
|
|
39
|
+
items: list[pytest.Item]):
|
|
37
40
|
if enabled:
|
|
38
41
|
factory = ItemFactory()
|
|
39
42
|
prev_test = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pytest-pyspec
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.10.0
|
|
4
4
|
Summary: A plugin that transforms the pytest output into a result similar to the RSpec. It enables the use of docstrings to display results and also enables the use of the prefixes "describe", "with" and "it".
|
|
5
5
|
Home-page: https://github.com/felipecrp/pytest-pyspec
|
|
6
6
|
License: MIT
|
|
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Requires-Dist: pytest (>=
|
|
17
|
+
Requires-Dist: pytest (>=8.3.2,<9.0.0)
|
|
18
18
|
Project-URL: Repository, https://github.com/felipecrp/pytest-pyspec
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
pytest_pyspec/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
pytest_pyspec/item.py,sha256=88vTXPCyy9eYGnKZtW7PZAh6O-HHSuFkXALifUPDK64,4249
|
|
3
|
+
pytest_pyspec/output.py,sha256=e5qUSfxlf6cseaFimSeCKetcVdAtQaAFxnE00Vy5klM,788
|
|
4
|
+
pytest_pyspec/plugin.py,sha256=xsC8ZAkPnU-qKbljn4RHWH9E1agoTPLFg9zh4_hrV80,2702
|
|
5
|
+
pytest_pyspec-0.10.0.dist-info/LICENSE,sha256=PXKqh3rDWRsfhWsjBQ27qqYzE5E05n-eFRH95LsKRT4,1094
|
|
6
|
+
pytest_pyspec-0.10.0.dist-info/METADATA,sha256=q7loyD7MoVBgBNxXtEemE-MbkD-dP8qQoW9pg9is9Jo,3539
|
|
7
|
+
pytest_pyspec-0.10.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
8
|
+
pytest_pyspec-0.10.0.dist-info/entry_points.txt,sha256=GObsuy5lIVED-9EDmeyFXzvZF3BLoZT7Ll58sTW2pnc,47
|
|
9
|
+
pytest_pyspec-0.10.0.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
pytest_pyspec/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
pytest_pyspec/item.py,sha256=r_Yr8s224s5IJCDTsnS5FzhOWhtHe4vJwpV7GHyUH40,4160
|
|
3
|
-
pytest_pyspec/output.py,sha256=e5qUSfxlf6cseaFimSeCKetcVdAtQaAFxnE00Vy5klM,788
|
|
4
|
-
pytest_pyspec/plugin.py,sha256=BAMdVU4XqwcThOiBrJC6JX0LsM6vjfLjmf1JGQMJNTE,2625
|
|
5
|
-
pytest_pyspec-0.8.3.dist-info/LICENSE,sha256=PXKqh3rDWRsfhWsjBQ27qqYzE5E05n-eFRH95LsKRT4,1094
|
|
6
|
-
pytest_pyspec-0.8.3.dist-info/METADATA,sha256=Bdhnt3joCaL_Hj_G1ezEc10fv2YzldXMjiN0QSqxygo,3538
|
|
7
|
-
pytest_pyspec-0.8.3.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
8
|
-
pytest_pyspec-0.8.3.dist-info/entry_points.txt,sha256=GObsuy5lIVED-9EDmeyFXzvZF3BLoZT7Ll58sTW2pnc,47
|
|
9
|
-
pytest_pyspec-0.8.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|