testit-adapter-pytest 3.6.1.post530__tar.gz → 3.6.3__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.
- {testit_adapter_pytest-3.6.1.post530 → testit_adapter_pytest-3.6.3}/PKG-INFO +2 -2
- {testit_adapter_pytest-3.6.1.post530 → testit_adapter_pytest-3.6.3}/setup.py +1 -1
- {testit_adapter_pytest-3.6.1.post530 → testit_adapter_pytest-3.6.3}/src/testit_adapter_pytest.egg-info/PKG-INFO +2 -2
- {testit_adapter_pytest-3.6.1.post530 → testit_adapter_pytest-3.6.3}/src/testit_adapter_pytest.egg-info/SOURCES.txt +2 -1
- testit_adapter_pytest-3.6.3/src/testit_adapter_pytest.egg-info/requires.txt +4 -0
- testit_adapter_pytest-3.6.3/tests/test_listener.py +56 -0
- testit_adapter_pytest-3.6.1.post530/src/testit_adapter_pytest.egg-info/requires.txt +0 -4
- {testit_adapter_pytest-3.6.1.post530 → testit_adapter_pytest-3.6.3}/README.md +0 -0
- {testit_adapter_pytest-3.6.1.post530 → testit_adapter_pytest-3.6.3}/setup.cfg +0 -0
- {testit_adapter_pytest-3.6.1.post530 → testit_adapter_pytest-3.6.3}/src/testit_adapter_pytest/__init__.py +0 -0
- {testit_adapter_pytest-3.6.1.post530 → testit_adapter_pytest-3.6.3}/src/testit_adapter_pytest/fixture_context.py +0 -0
- {testit_adapter_pytest-3.6.1.post530 → testit_adapter_pytest-3.6.3}/src/testit_adapter_pytest/listener.py +0 -0
- {testit_adapter_pytest-3.6.1.post530 → testit_adapter_pytest-3.6.3}/src/testit_adapter_pytest/models/__init__.py +0 -0
- {testit_adapter_pytest-3.6.1.post530 → testit_adapter_pytest-3.6.3}/src/testit_adapter_pytest/models/executable_test.py +0 -0
- {testit_adapter_pytest-3.6.1.post530 → testit_adapter_pytest-3.6.3}/src/testit_adapter_pytest/plugin.py +0 -0
- {testit_adapter_pytest-3.6.1.post530 → testit_adapter_pytest-3.6.3}/src/testit_adapter_pytest/utils.py +0 -0
- {testit_adapter_pytest-3.6.1.post530 → testit_adapter_pytest-3.6.3}/src/testit_adapter_pytest.egg-info/dependency_links.txt +0 -0
- {testit_adapter_pytest-3.6.1.post530 → testit_adapter_pytest-3.6.3}/src/testit_adapter_pytest.egg-info/entry_points.txt +0 -0
- {testit_adapter_pytest-3.6.1.post530 → testit_adapter_pytest-3.6.3}/src/testit_adapter_pytest.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: testit-adapter-pytest
|
|
3
|
-
Version: 3.6.
|
|
3
|
+
Version: 3.6.3
|
|
4
4
|
Summary: Pytest adapter for Test IT
|
|
5
5
|
Home-page: https://github.com/testit-tms/adapters-python/
|
|
6
6
|
Author: Integration team
|
|
@@ -16,7 +16,7 @@ Description-Content-Type: text/markdown
|
|
|
16
16
|
Requires-Dist: pytest
|
|
17
17
|
Requires-Dist: pytest-xdist
|
|
18
18
|
Requires-Dist: attrs
|
|
19
|
-
Requires-Dist: testit-python-commons==3.6.
|
|
19
|
+
Requires-Dist: testit-python-commons==3.6.3
|
|
20
20
|
Dynamic: author
|
|
21
21
|
Dynamic: author-email
|
|
22
22
|
Dynamic: classifier
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: testit-adapter-pytest
|
|
3
|
-
Version: 3.6.
|
|
3
|
+
Version: 3.6.3
|
|
4
4
|
Summary: Pytest adapter for Test IT
|
|
5
5
|
Home-page: https://github.com/testit-tms/adapters-python/
|
|
6
6
|
Author: Integration team
|
|
@@ -16,7 +16,7 @@ Description-Content-Type: text/markdown
|
|
|
16
16
|
Requires-Dist: pytest
|
|
17
17
|
Requires-Dist: pytest-xdist
|
|
18
18
|
Requires-Dist: attrs
|
|
19
|
-
Requires-Dist: testit-python-commons==3.6.
|
|
19
|
+
Requires-Dist: testit-python-commons==3.6.3
|
|
20
20
|
Dynamic: author
|
|
21
21
|
Dynamic: author-email
|
|
22
22
|
Dynamic: classifier
|
|
@@ -12,4 +12,5 @@ src/testit_adapter_pytest.egg-info/entry_points.txt
|
|
|
12
12
|
src/testit_adapter_pytest.egg-info/requires.txt
|
|
13
13
|
src/testit_adapter_pytest.egg-info/top_level.txt
|
|
14
14
|
src/testit_adapter_pytest/models/__init__.py
|
|
15
|
-
src/testit_adapter_pytest/models/executable_test.py
|
|
15
|
+
src/testit_adapter_pytest/models/executable_test.py
|
|
16
|
+
tests/test_listener.py
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
from unittest.mock import MagicMock
|
|
3
|
+
|
|
4
|
+
from testit_adapter_pytest.listener import TmsListener
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class TestTmsListener:
|
|
8
|
+
def test_add_link_appends_link(self, mocker):
|
|
9
|
+
# Arrange
|
|
10
|
+
mock_adapter_manager = mocker.MagicMock()
|
|
11
|
+
mock_step_manager = mocker.MagicMock()
|
|
12
|
+
mock_fixture_manager = mocker.MagicMock()
|
|
13
|
+
|
|
14
|
+
listener = TmsListener(
|
|
15
|
+
adapter_manager=mock_adapter_manager,
|
|
16
|
+
step_manager=mock_step_manager,
|
|
17
|
+
fixture_manager=mock_fixture_manager
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
# Mock the __executable_test attribute
|
|
21
|
+
mock_executable_test = mocker.MagicMock()
|
|
22
|
+
mock_executable_test.result_links = []
|
|
23
|
+
listener._TmsListener__executable_test = mock_executable_test
|
|
24
|
+
|
|
25
|
+
test_link = {"url": "http://example.com", "title": "Example"}
|
|
26
|
+
|
|
27
|
+
# Act
|
|
28
|
+
listener.add_link(test_link)
|
|
29
|
+
|
|
30
|
+
# Assert
|
|
31
|
+
assert len(mock_executable_test.result_links) == 1
|
|
32
|
+
assert mock_executable_test.result_links[0] == test_link
|
|
33
|
+
|
|
34
|
+
def test_add_link_does_nothing_if_no_executable_test(self, mocker):
|
|
35
|
+
# Arrange
|
|
36
|
+
mock_adapter_manager = mocker.MagicMock()
|
|
37
|
+
mock_step_manager = mocker.MagicMock()
|
|
38
|
+
mock_fixture_manager = mocker.MagicMock()
|
|
39
|
+
|
|
40
|
+
listener = TmsListener(
|
|
41
|
+
adapter_manager=mock_adapter_manager,
|
|
42
|
+
step_manager=mock_step_manager,
|
|
43
|
+
fixture_manager=mock_fixture_manager
|
|
44
|
+
)
|
|
45
|
+
listener._TmsListener__executable_test = None # Ensure __executable_test is None
|
|
46
|
+
|
|
47
|
+
test_link = {"url": "http://example.com", "title": "Example"}
|
|
48
|
+
|
|
49
|
+
# Act
|
|
50
|
+
listener.add_link(test_link)
|
|
51
|
+
|
|
52
|
+
# Assert
|
|
53
|
+
# No direct assertion on links, but we ensure no error and __executable_test remains None
|
|
54
|
+
# If __executable_test had a result_links attribute, we would check it's still empty.
|
|
55
|
+
# For this case, the main check is that no AttributeError occurs.
|
|
56
|
+
assert listener._TmsListener__executable_test is None
|
|
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
|