pytest-pyspec 0.4.2__py3-none-any.whl → 0.5.1__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 CHANGED
@@ -1,4 +1,5 @@
1
1
  from types import ModuleType
2
+ from typing import Dict, List
2
3
  import pytest
3
4
 
4
5
  class Item:
@@ -58,8 +59,8 @@ class Test(Item):
58
59
  class Container(Item):
59
60
  def __init__(self, item: pytest.Item):
60
61
  super().__init__(item)
61
- self.tests = list[Test]()
62
- self.containers = list[Container]()
62
+ self.tests: List[Test] = list()
63
+ self.containers: List[Container] = list()
63
64
  self.parent = None
64
65
 
65
66
  def add(self, test: Test):
@@ -106,7 +107,7 @@ class ItemFactory:
106
107
 
107
108
  class ContainerFactory:
108
109
  def __init__(self) -> None:
109
- self.containers = dict[str, Container]()
110
+ self.containers: Dict[str, Container] = dict()
110
111
 
111
112
  def create(self, item) -> Container:
112
113
  containers = self._create_containers(item)
pytest_pyspec/plugin.py CHANGED
@@ -20,6 +20,16 @@ def pytest_configure(config: pytest.Config):
20
20
  if config.getoption('pyspec') and not config.getoption('verbose'):
21
21
  enabled = True
22
22
 
23
+ python_functions = config.getini("python_functions")
24
+ python_functions.append('it_')
25
+ config.option.python_functions = python_functions
26
+
27
+ python_classes = config.getini("python_classes")
28
+ python_classes.append('describe_')
29
+ python_classes.append('with_')
30
+ config.option.python_classes = python_classes
31
+
32
+
23
33
 
24
34
  test_key = pytest.StashKey[Test]()
25
35
  prev_test_key = pytest.StashKey[Test]()
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pytest-pyspec
3
- Version: 0.4.2
4
- Summary: A python test spec based on pytest
3
+ Version: 0.5.1
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: GPL-3.0-only
7
7
  Author: Felipe Curty
@@ -18,7 +18,7 @@ Project-URL: Repository, https://github.com/felipecrp/pytest-pyspec
18
18
  Description-Content-Type: text/markdown
19
19
 
20
20
 
21
- The **pySpec** plugin transforms the pytest output into RSpec.
21
+ The **pytest-pyspec** plugin transforms the pytest output into a result similar to the RSpec.
22
22
 
23
23
  Just nest your tests using classes and include _docstring_ for each class and test. You can create any nested levels.
24
24
 
@@ -73,3 +73,4 @@ A house
73
73
  pip install pytest-pyspec
74
74
  pytest --pyspec
75
75
  ```
76
+
@@ -0,0 +1,9 @@
1
+ pytest_pyspec/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ pytest_pyspec/item.py,sha256=ALTEaBmxvE0GJ0c7bf6_UTs9BOst9_uknGVkSJcR6O4,3797
3
+ pytest_pyspec/output.py,sha256=nckOCOa4V5oH43tlvaflVIj6fgC8OU3I8p3ADn_N3jM,758
4
+ pytest_pyspec/plugin.py,sha256=qL1Wp8ITvhrNRoUkF-58RejZnsuIbUPYw-kU3B7OFyw,2313
5
+ pytest_pyspec-0.5.1.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
6
+ pytest_pyspec-0.5.1.dist-info/METADATA,sha256=LdCT8zy17SO-jJaUr3b3r0D7gtxv9GIanntqfrK5MH0,1945
7
+ pytest_pyspec-0.5.1.dist-info/WHEEL,sha256=kLuE8m1WYU0Ig0_YEGrXyTtiJvKPpLpDEiChiNyei5Y,88
8
+ pytest_pyspec-0.5.1.dist-info/entry_points.txt,sha256=GObsuy5lIVED-9EDmeyFXzvZF3BLoZT7Ll58sTW2pnc,47
9
+ pytest_pyspec-0.5.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.4.0
2
+ Generator: poetry-core 1.5.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,9 +0,0 @@
1
- pytest_pyspec/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- pytest_pyspec/item.py,sha256=bplVZW87fW6c9Wo7YpZxCHwwbe91ZybIU3F98Ur9DZk,3749
3
- pytest_pyspec/output.py,sha256=nckOCOa4V5oH43tlvaflVIj6fgC8OU3I8p3ADn_N3jM,758
4
- pytest_pyspec/plugin.py,sha256=g4TGAkqFD0B_6tjNMB5hazpbaZ8x_Sjd-oyzn-43K0c,1959
5
- pytest_pyspec-0.4.2.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
6
- pytest_pyspec-0.4.2.dist-info/METADATA,sha256=5PMfxx0V0ebDqFpFpMkdtmruXRefgXWhMG-GroCSmVs,1747
7
- pytest_pyspec-0.4.2.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
8
- pytest_pyspec-0.4.2.dist-info/entry_points.txt,sha256=GObsuy5lIVED-9EDmeyFXzvZF3BLoZT7Ll58sTW2pnc,47
9
- pytest_pyspec-0.4.2.dist-info/RECORD,,