pytest-plugins 0.1.26__tar.gz → 0.2.28__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_plugins-0.1.26/pytest_plugins.egg-info → pytest_plugins-0.2.28}/PKG-INFO +2 -2
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins/better_report.py +7 -1
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins/models/test_data.py +1 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins/utils/create_report.py +1 -2
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins/utils/pytest_helper.py +5 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28/pytest_plugins.egg-info}/PKG-INFO +2 -2
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins.egg-info/requires.txt +1 -1
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/requirements.txt +1 -1
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/setup.py +1 -1
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/tests/test_dummy.py +6 -2
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/LICENSE +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/MANIFEST.in +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/README.md +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pyproject.toml +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins/__init__.py +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins/add_config_parameters.py +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins/fail2skip.py +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins/max_fail_streak.py +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins/models/__init__.py +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins/models/base_class_test.py +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins/models/environment_data.py +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins/models/execution_data.py +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins/models/status.py +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins/utils/__init__.py +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins/utils/helper.py +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins.egg-info/SOURCES.txt +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins.egg-info/dependency_links.txt +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins.egg-info/entry_points.txt +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins.egg-info/top_level.txt +0 -0
- {pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-plugins
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.28
|
|
4
4
|
Summary: A Python package for managing pytest plugins.
|
|
5
5
|
Home-page: https://github.com/aviz92/pytest-plugins
|
|
6
6
|
Author: Avi Zaguri
|
|
@@ -17,7 +17,7 @@ Requires-Dist: dotenv
|
|
|
17
17
|
Requires-Dist: colorlog
|
|
18
18
|
Requires-Dist: pytest
|
|
19
19
|
Requires-Dist: pytest-rerunfailures
|
|
20
|
-
Requires-Dist:
|
|
20
|
+
Requires-Dist: custom-python-logger
|
|
21
21
|
Dynamic: author
|
|
22
22
|
Dynamic: classifier
|
|
23
23
|
Dynamic: description
|
|
@@ -15,7 +15,12 @@ from _pytest.python import Function
|
|
|
15
15
|
from pytest_plugins.models.environment_data import EnvironmentData
|
|
16
16
|
from pytest_plugins.utils.helper import save_as_json, serialize_data, save_as_markdown
|
|
17
17
|
from pytest_plugins.models import ExecutionData, ExecutionStatus, TestData
|
|
18
|
-
from pytest_plugins.utils.pytest_helper import
|
|
18
|
+
from pytest_plugins.utils.pytest_helper import (
|
|
19
|
+
get_test_full_name,
|
|
20
|
+
get_test_name_without_parameters,
|
|
21
|
+
get_test_full_path,
|
|
22
|
+
get_pytest_test_name
|
|
23
|
+
)
|
|
19
24
|
from pytest_plugins.utils.create_report import generate_md_report
|
|
20
25
|
|
|
21
26
|
execution_results = {}
|
|
@@ -117,6 +122,7 @@ def pytest_collection_modifyitems(config: Config, items: list[Function]) -> None
|
|
|
117
122
|
test_results[test_full_name] = TestData(
|
|
118
123
|
class_test_name=item.cls.__name__ if item.cls else None,
|
|
119
124
|
test_name=test_name,
|
|
125
|
+
pytest_test_name=get_pytest_test_name(item=item),
|
|
120
126
|
test_full_name=test_full_name,
|
|
121
127
|
test_full_path=get_test_full_path(item=item),
|
|
122
128
|
test_file_name=item.fspath.basename,
|
|
@@ -24,10 +24,9 @@ def generate_md_report(report: dict) -> str:
|
|
|
24
24
|
)
|
|
25
25
|
rows.append(f"|{index}| `{name}` | {icon} {status} | {duration} | `{msg}` |")
|
|
26
26
|
|
|
27
|
-
summary = f"\n🧪 Total: {len(report)} | " + " | ".join(['','',''])
|
|
28
27
|
total_summary = f"\n🧪 Total: {len(report)} | " + " | ".join(
|
|
29
28
|
f"{icon} {k.capitalize()}: {v}" for k, v in stats.items()
|
|
30
29
|
for icon in [status_icons.get(k, "")]
|
|
31
30
|
)
|
|
32
31
|
|
|
33
|
-
return "## ✅ Test Report Summary\n\n" + "\n".join(rows) +
|
|
32
|
+
return "## ✅ Test Report Summary\n\n" + "\n".join(rows) + f'\n<br> \n\n### Summary: <br> \n{total_summary}'
|
|
@@ -15,6 +15,11 @@ def get_test_name_without_parameters(item: Function) -> str:
|
|
|
15
15
|
return item.nodeid.split('.py::')[-1].split('[')[0]
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
def get_pytest_test_name(item: Function) -> str:
|
|
19
|
+
"""Get the test name without parameters."""
|
|
20
|
+
return item.nodeid.split('.py::')[-1]
|
|
21
|
+
|
|
22
|
+
|
|
18
23
|
def get_test_full_name(item: Function) -> str:
|
|
19
24
|
"""Get the full name of the test, including parameters if available."""
|
|
20
25
|
test_name = get_test_name_without_parameters(item=item)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-plugins
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.28
|
|
4
4
|
Summary: A Python package for managing pytest plugins.
|
|
5
5
|
Home-page: https://github.com/aviz92/pytest-plugins
|
|
6
6
|
Author: Avi Zaguri
|
|
@@ -17,7 +17,7 @@ Requires-Dist: dotenv
|
|
|
17
17
|
Requires-Dist: colorlog
|
|
18
18
|
Requires-Dist: pytest
|
|
19
19
|
Requires-Dist: pytest-rerunfailures
|
|
20
|
-
Requires-Dist:
|
|
20
|
+
Requires-Dist: custom-python-logger
|
|
21
21
|
Dynamic: author
|
|
22
22
|
Dynamic: classifier
|
|
23
23
|
Dynamic: description
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import pytest
|
|
2
2
|
|
|
3
|
-
parametrize = pytest.mark.parametrize(
|
|
3
|
+
parametrize = pytest.mark.parametrize(
|
|
4
|
+
"param1, param2", [("A", "A"), (2, 2), (3, 3), (4, 5)]
|
|
5
|
+
)
|
|
6
|
+
|
|
4
7
|
|
|
5
8
|
class TestDummy:
|
|
6
9
|
@pytest.mark.test_pass
|
|
7
10
|
def test_pass(self):
|
|
8
11
|
assert True
|
|
9
12
|
|
|
13
|
+
@pytest.mark.test_fail
|
|
10
14
|
def test_false(self):
|
|
11
15
|
assert False, {"message": "This test is expected to fail."}
|
|
12
16
|
|
|
@@ -19,7 +23,7 @@ class TestDummy:
|
|
|
19
23
|
assert param1 != param2, {
|
|
20
24
|
"expected_value": param1,
|
|
21
25
|
"actual_value": param2,
|
|
22
|
-
"diagnostic_info": {"param1": param1, "param2": param2}
|
|
26
|
+
"diagnostic_info": {"param1": param1, "param2": param2},
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
@pytest.mark.parametrize("param1, param2", [(1, 1), (2, 2), (3, 3), (4, 5)])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_plugins-0.1.26 → pytest_plugins-0.2.28}/pytest_plugins.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|