pytest-pyspec 0.5.0__tar.gz → 0.5.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_pyspec-0.5.0 → pytest_pyspec-0.5.1}/PKG-INFO +1 -1
- {pytest_pyspec-0.5.0 → pytest_pyspec-0.5.1}/pyproject.toml +1 -1
- {pytest_pyspec-0.5.0 → pytest_pyspec-0.5.1}/pytest_pyspec/item.py +4 -6
- pytest_pyspec-0.5.0/setup.py +0 -34
- {pytest_pyspec-0.5.0 → pytest_pyspec-0.5.1}/LICENSE +0 -0
- {pytest_pyspec-0.5.0 → pytest_pyspec-0.5.1}/README.md +0 -0
- {pytest_pyspec-0.5.0 → pytest_pyspec-0.5.1}/pytest_pyspec/__init__.py +0 -0
- {pytest_pyspec-0.5.0 → pytest_pyspec-0.5.1}/pytest_pyspec/output.py +0 -0
- {pytest_pyspec-0.5.0 → pytest_pyspec-0.5.1}/pytest_pyspec/plugin.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pytest-pyspec
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.1
|
|
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: GPL-3.0-only
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "pytest-pyspec"
|
|
3
|
-
version = "0.5.
|
|
3
|
+
version = "0.5.1"
|
|
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 = "GPL-3.0-only"
|
|
@@ -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:
|
|
@@ -35,9 +36,6 @@ class Item:
|
|
|
35
36
|
description = description.replace('describe_', '')
|
|
36
37
|
split = True
|
|
37
38
|
|
|
38
|
-
if description.lower().startswith("with_"):
|
|
39
|
-
split = True
|
|
40
|
-
|
|
41
39
|
if split:
|
|
42
40
|
description = description.replace('_', ' ')
|
|
43
41
|
|
|
@@ -61,8 +59,8 @@ class Test(Item):
|
|
|
61
59
|
class Container(Item):
|
|
62
60
|
def __init__(self, item: pytest.Item):
|
|
63
61
|
super().__init__(item)
|
|
64
|
-
self.tests = list
|
|
65
|
-
self.containers = list
|
|
62
|
+
self.tests: List[Test] = list()
|
|
63
|
+
self.containers: List[Container] = list()
|
|
66
64
|
self.parent = None
|
|
67
65
|
|
|
68
66
|
def add(self, test: Test):
|
|
@@ -109,7 +107,7 @@ class ItemFactory:
|
|
|
109
107
|
|
|
110
108
|
class ContainerFactory:
|
|
111
109
|
def __init__(self) -> None:
|
|
112
|
-
self.containers
|
|
110
|
+
self.containers: Dict[str, Container] = dict()
|
|
113
111
|
|
|
114
112
|
def create(self, item) -> Container:
|
|
115
113
|
containers = self._create_containers(item)
|
pytest_pyspec-0.5.0/setup.py
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
from setuptools import setup
|
|
3
|
-
|
|
4
|
-
packages = \
|
|
5
|
-
['pytest_pyspec']
|
|
6
|
-
|
|
7
|
-
package_data = \
|
|
8
|
-
{'': ['*']}
|
|
9
|
-
|
|
10
|
-
install_requires = \
|
|
11
|
-
['pytest>=7.2.1,<8.0.0']
|
|
12
|
-
|
|
13
|
-
entry_points = \
|
|
14
|
-
{'pytest11': ['pytest_pyspec = pytest_pyspec.plugin']}
|
|
15
|
-
|
|
16
|
-
setup_kwargs = {
|
|
17
|
-
'name': 'pytest-pyspec',
|
|
18
|
-
'version': '0.5.0',
|
|
19
|
-
'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".',
|
|
20
|
-
'long_description': '\nThe **pytest-pyspec** plugin transforms the pytest output into a result similar to the RSpec.\n\nJust nest your tests using classes and include _docstring_ for each class and test. You can create any nested levels.\n\nThe following test sample:\n\n```python\nimport pytest\n\nclass TestHouse:\n "a House"\n \n def test_door(self):\n "has door"\n assert 1 == 1\n \n class TestTwoFloors:\n """with two floors\n \n A house with two floor has stairs\n """\n def test_stairs(self):\n "has stairs"\n assert 1 == 1\n\n def test_second_floor(self):\n "has second floor"\n assert 1 == 1\n\n def test_third_floor(self):\n "has third floor"\n assert 1 == 2\n```\n\nGenerates the following output:\n\n```\ntest/test_sample.py \n\nA house\n ✓ Has door\n\nA house\n With two floors\n ✓ Has stairs\n ✓ Has second floor\n ✗ Has third floor\n```\n\n## Installing and running **pySpec**\n\n```bash\npip install pytest-pyspec\npytest --pyspec\n```\n',
|
|
21
|
-
'author': 'Felipe Curty',
|
|
22
|
-
'author_email': 'felipecrp@gmail.com',
|
|
23
|
-
'maintainer': 'None',
|
|
24
|
-
'maintainer_email': 'None',
|
|
25
|
-
'url': 'https://github.com/felipecrp/pytest-pyspec',
|
|
26
|
-
'packages': packages,
|
|
27
|
-
'package_data': package_data,
|
|
28
|
-
'install_requires': install_requires,
|
|
29
|
-
'entry_points': entry_points,
|
|
30
|
-
'python_requires': '>=3.8,<4.0',
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
setup(**setup_kwargs)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|