pytest-pyspec 0.9.0__tar.gz → 0.10.0__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.

Potentially problematic release.


This version of pytest-pyspec might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pytest-pyspec
3
- Version: 0.9.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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pytest-pyspec"
3
- version = "0.9.0"
3
+ version = "0.10.0"
4
4
  description = "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
  authors = ["Felipe Curty <felipecrp@gmail.com>"]
6
6
  license = "MIT"
@@ -20,6 +20,9 @@ pytest_pyspec = "pytest_pyspec.plugin"
20
20
  [tool.poetry.group.dev.dependencies]
21
21
  autopep8 = "^2.0.2"
22
22
 
23
+ [tool.pytest.ini_options]
24
+ addopts = "--pyspec"
25
+
23
26
  [build-system]
24
27
  requires = ["poetry-core"]
25
28
  build-backend = "poetry.core.masonry.api"
@@ -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):
@@ -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(session, config, items):
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
File without changes
File without changes