Skip to content

Commit ac0d330

Browse files
committed
Add more tests
1 parent aab4891 commit ac0d330

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

tests/integration/__init__.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
] + \
2727
[['examples/params/test_in_class_parameterized.py']] * 5 + \
2828
[['examples/hierarchy/inner/test_inner_simple.py']] * 7 + \
29-
[['examples/hierarchy/test_in_class_in_class.py']]
29+
[['examples/hierarchy/test_in_class_in_class.py']] + \
30+
[['examples/test_simple.py']] * 2
3031

3132
# noinspection PyTypeChecker
3233
HIERARCHY_TEST_VARIABLES = \
@@ -54,7 +55,9 @@
5455
dict({'rp_hierarchy_dirs_level': -1, 'rp_hierarchy_code': True,
5556
}, **utils.DEFAULT_VARIABLES),
5657
dict(**utils.DEFAULT_VARIABLES),
57-
dict(**utils.DEFAULT_VARIABLES)
58+
dict(**utils.DEFAULT_VARIABLES),
59+
dict({'rp_hierarchy_test_file': False}, **utils.DEFAULT_VARIABLES),
60+
dict({'rp_hierarchy_test_file': False, 'rp_hierarchy_dirs_level': 1}, **utils.DEFAULT_VARIABLES)
5861
]
5962

6063
HIERARCHY_TEST_EXPECTED_ITEMS = [
@@ -235,6 +238,14 @@
235238
{'name': 'examples/hierarchy/test_in_class_in_class.py::Tests::Test'
236239
'::test_in_class_in_class',
237240
'item_type': 'STEP', 'parent_item_id': lambda x: x is None}
241+
],
242+
[
243+
{'name': 'examples/test_simple',
244+
'item_type': 'STEP', 'parent_item_id': lambda x: x is None}
245+
],
246+
[
247+
{'name': 'test_simple',
248+
'item_type': 'STEP', 'parent_item_id': lambda x: x is None}
238249
]
239250
]
240251

tests/integration/test_suite_hierarchy.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"""This module includes integration tests for different suite hierarchy."""
1515

1616
import pytest
17-
from delayed_assert import expect, assert_expectations
1817
from unittest import mock
1918

2019
from tests import REPORT_PORTAL_SERVICE
@@ -29,11 +28,10 @@ def verify_start_item_parameters(mock_client, expected_items):
2928
call_args = mock_client.start_test_item.call_args_list
3029
for i, call in enumerate(call_args):
3130
start_kwargs = call[1]
32-
expect(start_kwargs['name'] == expected_items[i]['name'])
33-
expect(start_kwargs['item_type'] == expected_items[i]['item_type'])
31+
assert start_kwargs['name'] == expected_items[i]['name']
32+
assert start_kwargs['item_type'] == expected_items[i]['item_type']
3433
verification = expected_items[i]['parent_item_id']
35-
expect(verification(start_kwargs['parent_item_id']))
36-
assert_expectations()
34+
assert verification(start_kwargs['parent_item_id'])
3735

3836

3937
@pytest.mark.parametrize(('test', 'variables', 'expected_items'),

0 commit comments

Comments
 (0)