testit-adapter-pytest 2.8.3__tar.gz → 3.0.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.
Files changed (20) hide show
  1. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/PKG-INFO +2 -2
  2. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/setup.py +2 -2
  3. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/src/testit_adapter_pytest/listener.py +7 -22
  4. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/src/testit_adapter_pytest/utils.py +1 -1
  5. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/src/testit_adapter_pytest.egg-info/PKG-INFO +2 -2
  6. testit_adapter_pytest-3.0.0/src/testit_adapter_pytest.egg-info/requires.txt +4 -0
  7. testit-adapter-pytest-2.8.3/src/testit_adapter_pytest.egg-info/requires.txt +0 -4
  8. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/README.md +0 -0
  9. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/setup.cfg +0 -0
  10. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/src/testit_adapter_pytest/__init__.py +0 -0
  11. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/src/testit_adapter_pytest/fixture_context.py +0 -0
  12. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/src/testit_adapter_pytest/fixture_manager.py +0 -0
  13. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/src/testit_adapter_pytest/fixture_storage.py +0 -0
  14. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/src/testit_adapter_pytest/models/__init__.py +0 -0
  15. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/src/testit_adapter_pytest/models/fixture.py +0 -0
  16. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/src/testit_adapter_pytest/plugin.py +0 -0
  17. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/src/testit_adapter_pytest.egg-info/SOURCES.txt +0 -0
  18. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/src/testit_adapter_pytest.egg-info/dependency_links.txt +0 -0
  19. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/src/testit_adapter_pytest.egg-info/entry_points.txt +0 -0
  20. {testit-adapter-pytest-2.8.3 → testit_adapter_pytest-3.0.0}/src/testit_adapter_pytest.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: testit-adapter-pytest
3
- Version: 2.8.3
3
+ Version: 3.0.0
4
4
  Summary: Pytest adapter for Test IT
5
5
  Home-page: https://github.com/testit-tms/adapters-python/
6
6
  Author: Integration team
@@ -18,7 +18,7 @@ Description-Content-Type: text/markdown
18
18
  Requires-Dist: pytest
19
19
  Requires-Dist: pytest-xdist
20
20
  Requires-Dist: attrs
21
- Requires-Dist: testit-python-commons==2.8.3
21
+ Requires-Dist: testit-python-commons==3.0.0
22
22
 
23
23
  # Test IT TMS adapter for Pytest
24
24
 
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
2
2
 
3
3
  setup(
4
4
  name='testit-adapter-pytest',
5
- version='2.8.3',
5
+ version='3.0.0',
6
6
  description='Pytest adapter for Test IT',
7
7
  long_description=open('README.md', "r").read(),
8
8
  long_description_content_type="text/markdown",
@@ -23,6 +23,6 @@ setup(
23
23
  py_modules=['testit_adapter_pytest'],
24
24
  packages=find_packages(where='src'),
25
25
  package_dir={'': 'src'},
26
- install_requires=['pytest', 'pytest-xdist', 'attrs', 'testit-python-commons==2.8.3'],
26
+ install_requires=['pytest', 'pytest-xdist', 'attrs', 'testit-python-commons==3.0.0'],
27
27
  entry_points={'pytest11': ['testit_adapter_pytest = testit_adapter_pytest.plugin']}
28
28
  )
@@ -128,10 +128,8 @@ class TmsListener(object):
128
128
  index = 0
129
129
 
130
130
  for item in items:
131
- if hasattr(item.function, 'test_external_id'):
132
- item.test_external_id = item.function.test_external_id
133
- else:
134
- item.test_external_id = utils.get_hash(item.nodeid + item.function.__name__)
131
+ if not hasattr(item.function, 'test_external_id'):
132
+ item.function.test_external_id = utils.get_hash(item.parent.nodeid + item.function.__name__)
135
133
 
136
134
  if item.own_markers:
137
135
  for mark in item.own_markers:
@@ -142,8 +140,8 @@ class TmsListener(object):
142
140
  item.own_markers.index(mark))
143
141
 
144
142
  params = utils.get_all_parameters(item)
145
- item.test_external_id = utils.collect_parameters_in_string_attribute(
146
- item.test_external_id,
143
+ item.function.test_external_id = utils.collect_parameters_in_string_attribute(
144
+ item.function.test_external_id,
147
145
  params)
148
146
 
149
147
  item.index = index
@@ -151,7 +149,7 @@ class TmsListener(object):
151
149
  index = index + 1 if len(items) > item_id + 1 and items[item_id + 1].originalname == item.originalname \
152
150
  else 0
153
151
 
154
- if cls.__check_external_id_in_resolved_autotests(item.test_external_id, resolved_autotests):
152
+ if cls.__check_external_id_in_resolved_autotests(item.function.test_external_id, resolved_autotests):
155
153
  separation_of_tests.add_item_to_selected_items(item)
156
154
  else:
157
155
  separation_of_tests.add_item_to_deselected_items(item)
@@ -165,19 +163,6 @@ class TmsListener(object):
165
163
 
166
164
  @pytest.hookimpl(tryfirst=True)
167
165
  def pytest_runtest_protocol(self, item):
168
- if not hasattr(item.function, 'test_external_id'):
169
- item.test_external_id = utils.get_hash(item.nodeid + item.function.__name__)
170
-
171
- if not hasattr(item.function, 'test_displayname'):
172
- item.test_displayname = item.function.__doc__ if \
173
- item.function.__doc__ else item.function.__name__
174
- else:
175
- params = utils.get_all_parameters(item)
176
-
177
- item.test_displayname = utils.collect_parameters_in_string_attribute(
178
- item.function.test_displayname,
179
- params)
180
-
181
166
  self.__executable_test = utils.form_test(item)
182
167
 
183
168
  @pytest.hookimpl(hookwrapper=True)
@@ -335,8 +320,8 @@ class TmsListener(object):
335
320
  group_uuid = self._cache.push(fixturedef)
336
321
  group = FixturesContainer(uuid=group_uuid)
337
322
  self.fixture_manager.start_group(group_uuid, group)
338
- if item.test_external_id not in group.external_ids:
339
- self.fixture_manager.update_group(group_uuid, external_ids=item.test_external_id)
323
+ if item.function.test_external_id not in group.external_ids:
324
+ self.fixture_manager.update_group(group_uuid, external_ids=item.function.test_external_id)
340
325
 
341
326
 
342
327
  def _test_fixtures(item):
@@ -75,7 +75,7 @@ def __get_external_id_from(item):
75
75
  external_id = __search_attribute(item, 'test_external_id')
76
76
 
77
77
  if not external_id:
78
- return get_hash(item.nodeid + item.function.__name__)
78
+ return get_hash(item.parent.nodeid + item.function.__name__)
79
79
 
80
80
  return collect_parameters_in_string_attribute(external_id, get_all_parameters(item))
81
81
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: testit-adapter-pytest
3
- Version: 2.8.3
3
+ Version: 3.0.0
4
4
  Summary: Pytest adapter for Test IT
5
5
  Home-page: https://github.com/testit-tms/adapters-python/
6
6
  Author: Integration team
@@ -18,7 +18,7 @@ Description-Content-Type: text/markdown
18
18
  Requires-Dist: pytest
19
19
  Requires-Dist: pytest-xdist
20
20
  Requires-Dist: attrs
21
- Requires-Dist: testit-python-commons==2.8.3
21
+ Requires-Dist: testit-python-commons==3.0.0
22
22
 
23
23
  # Test IT TMS adapter for Pytest
24
24
 
@@ -0,0 +1,4 @@
1
+ pytest
2
+ pytest-xdist
3
+ attrs
4
+ testit-python-commons==3.0.0
@@ -1,4 +0,0 @@
1
- pytest
2
- pytest-xdist
3
- attrs
4
- testit-python-commons==2.8.3