Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Dec 3, 2024
1 parent ac0d330 commit 4f9a8f7
Showing 1 changed file with 71 additions and 134 deletions.
205 changes: 71 additions & 134 deletions tests/integration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,22 @@

# noinspection PyTypeChecker
HIERARCHY_TEST_VARIABLES = \
[dict({'rp_hierarchy_dirs': True, 'rp_hierarchy_code': True},
**utils.DEFAULT_VARIABLES)] * 6 + \
[
dict({'rp_hierarchy_dirs': True, 'rp_hierarchy_code': True,
'rp_hierarchy_dirs_level': 1}, **utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dirs': True, 'rp_hierarchy_code': True,
'rp_hierarchy_dirs_level': 2}, **utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dirs': True, 'rp_hierarchy_code': True,
'rp_hierarchy_dirs_level': 999}, **utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dirs': True, 'rp_hierarchy_code': True,
'rp_hierarchy_dirs_level': -1}, **utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dir_path_separator': '/',
'rp_hierarchy_code': True}, **utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dir_path_separator': '\\',
'rp_hierarchy_code': True}, **utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dirs_level': 1, 'rp_hierarchy_code': True,
}, **utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dirs_level': 2, 'rp_hierarchy_code': True,
}, **utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dirs_level': 999, 'rp_hierarchy_code': True,
}, **utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dirs_level': -1, 'rp_hierarchy_code': True,
}, **utils.DEFAULT_VARIABLES),
[dict({'rp_hierarchy_dirs': True, 'rp_hierarchy_code': True}, **utils.DEFAULT_VARIABLES)] * 6 + \
[
dict({'rp_hierarchy_dirs': True, 'rp_hierarchy_code': True, 'rp_hierarchy_dirs_level': 1},
**utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dirs': True, 'rp_hierarchy_code': True, 'rp_hierarchy_dirs_level': 2},
**utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dirs': True, 'rp_hierarchy_code': True, 'rp_hierarchy_dirs_level': 999},
**utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dirs': True, 'rp_hierarchy_code': True, 'rp_hierarchy_dirs_level': -1},
**utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dir_path_separator': '/', 'rp_hierarchy_code': True}, **utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dir_path_separator': '\\', 'rp_hierarchy_code': True}, **utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dirs_level': 1, 'rp_hierarchy_code': True}, **utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dirs_level': 2, 'rp_hierarchy_code': True}, **utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dirs_level': 999, 'rp_hierarchy_code': True}, **utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_dirs_level': -1, 'rp_hierarchy_code': True}, **utils.DEFAULT_VARIABLES),
dict(**utils.DEFAULT_VARIABLES),
dict(**utils.DEFAULT_VARIABLES),
dict({'rp_hierarchy_test_file': False}, **utils.DEFAULT_VARIABLES),
Expand All @@ -62,190 +55,134 @@

HIERARCHY_TEST_EXPECTED_ITEMS = [
[
{'name': 'examples', 'item_type': 'SUITE',
'parent_item_id': lambda x: x is None},
{'name': 'test_simple.py', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('examples')},
{'name': 'test_simple', 'item_type': 'STEP',
'parent_item_id': lambda x: x.startswith('test_simple.py')}
{'name': 'examples', 'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'test_simple.py', 'item_type': 'SUITE', 'parent_item_id': lambda x: x.startswith('examples')},
{'name': 'test_simple', 'item_type': 'STEP', 'parent_item_id': lambda x: x.startswith('test_simple.py')}
],
[
{'name': 'examples', 'item_type': 'SUITE',
'parent_item_id': lambda x: x is None},
{'name': 'hierarchy', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('examples')},
{'name': 'inner', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('hierarchy')},
{'name': 'test_inner_simple.py', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('inner')},
{'name': 'test_simple', 'item_type': 'STEP',
'parent_item_id': lambda x: x.startswith('test_inner_simple.py')}
{'name': 'examples', 'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'hierarchy', 'item_type': 'SUITE', 'parent_item_id': lambda x: x.startswith('examples')},
{'name': 'inner', 'item_type': 'SUITE', 'parent_item_id': lambda x: x.startswith('hierarchy')},
{'name': 'test_inner_simple.py', 'item_type': 'SUITE', 'parent_item_id': lambda x: x.startswith('inner')},
{'name': 'test_simple', 'item_type': 'STEP', 'parent_item_id': lambda x: x.startswith('test_inner_simple.py')}
],
[
{'name': 'examples', 'item_type': 'SUITE',
'parent_item_id': lambda x: x is None},
{'name': 'hierarchy', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('examples')},
{'name': 'test_in_class.py', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('hierarchy')},
{'name': 'Tests', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('test_in_class.py')},
{'name': 'test_in_class', 'item_type': 'STEP',
'parent_item_id': lambda x: x.startswith('Tests')}
{'name': 'examples', 'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'hierarchy', 'item_type': 'SUITE', 'parent_item_id': lambda x: x.startswith('examples')},
{'name': 'test_in_class.py', 'item_type': 'SUITE', 'parent_item_id': lambda x: x.startswith('hierarchy')},
{'name': 'Tests', 'item_type': 'SUITE', 'parent_item_id': lambda x: x.startswith('test_in_class.py')},
{'name': 'test_in_class', 'item_type': 'STEP', 'parent_item_id': lambda x: x.startswith('Tests')}
],
[
{'name': 'examples', 'item_type': 'SUITE',
'parent_item_id': lambda x: x is None},
{'name': 'hierarchy', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('examples')},
{'name': 'examples', 'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'hierarchy', 'item_type': 'SUITE', 'parent_item_id': lambda x: x.startswith('examples')},
{'name': 'test_in_class_in_class.py', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('hierarchy')},
{'name': 'Tests', 'item_type': 'SUITE',
'parent_item_id': lambda x:
x.startswith('test_in_class_in_class.py')},
{'name': 'Test', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('Tests')},
{'name': 'test_in_class_in_class', 'item_type': 'STEP',
'parent_item_id': lambda x: x.startswith('Test')}
'parent_item_id': lambda x: x.startswith('test_in_class_in_class.py')},
{'name': 'Test', 'item_type': 'SUITE', 'parent_item_id': lambda x: x.startswith('Tests')},
{'name': 'test_in_class_in_class', 'item_type': 'STEP', 'parent_item_id': lambda x: x.startswith('Test')}
],
[
{'name': 'examples', 'item_type': 'SUITE',
'parent_item_id': lambda x: x is None},
{'name': 'hierarchy', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('examples')},
{'name': 'another_inner', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('hierarchy')},
{'name': 'examples', 'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'hierarchy', 'item_type': 'SUITE', 'parent_item_id': lambda x: x.startswith('examples')},
{'name': 'another_inner', 'item_type': 'SUITE', 'parent_item_id': lambda x: x.startswith('hierarchy')},
{'name': 'test_another_inner_simple.py', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('another_inner')},
{'name': 'test_simple', 'item_type': 'STEP',
'parent_item_id': lambda x: x.startswith(
'test_another_inner_simple.py')},
{'name': 'inner', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('hierarchy')},
{'name': 'test_inner_simple.py', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('inner')},
{'name': 'test_simple', 'item_type': 'STEP',
'parent_item_id': lambda x: x.startswith('test_inner_simple.py')}
'parent_item_id': lambda x: x.startswith('test_another_inner_simple.py')},
{'name': 'inner', 'item_type': 'SUITE', 'parent_item_id': lambda x: x.startswith('hierarchy')},
{'name': 'test_inner_simple.py', 'item_type': 'SUITE', 'parent_item_id': lambda x: x.startswith('inner')},
{'name': 'test_simple', 'item_type': 'STEP', 'parent_item_id': lambda x: x.startswith('test_inner_simple.py')}
],
[
{'name': 'examples', 'item_type': 'SUITE',
'parent_item_id': lambda x: x is None},
{'name': 'params', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('examples')},
{'name': 'examples', 'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'params', 'item_type': 'SUITE', 'parent_item_id': lambda x: x.startswith('examples')},
{'name': 'test_in_class_parameterized.py', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('params')},
{'name': 'Tests', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith(
'test_in_class_parameterized.py')},
'parent_item_id': lambda x: x.startswith('test_in_class_parameterized.py')},
{'name': 'test_in_class_parameterized[param]', 'item_type': 'STEP',
'parent_item_id': lambda x: x.startswith('Tests')}
],
[
{'name': 'params', 'item_type': 'SUITE',
'parent_item_id': lambda x: x is None},
{'name': 'params', 'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'test_in_class_parameterized.py', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('params')},
{'name': 'Tests', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith(
'test_in_class_parameterized.py')},
'parent_item_id': lambda x: x.startswith('test_in_class_parameterized.py')},
{'name': 'test_in_class_parameterized[param]', 'item_type': 'STEP',
'parent_item_id': lambda x: x.startswith('Tests')}
],
[
{'name': 'test_in_class_parameterized.py', 'item_type': 'SUITE',
'parent_item_id': lambda x: x is None},
{'name': 'test_in_class_parameterized.py', 'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'Tests', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith(
'test_in_class_parameterized.py')},
'parent_item_id': lambda x: x.startswith('test_in_class_parameterized.py')},
{'name': 'test_in_class_parameterized[param]', 'item_type': 'STEP',
'parent_item_id': lambda x: x.startswith('Tests')}
],
[
{'name': 'test_in_class_parameterized.py', 'item_type': 'SUITE',
'parent_item_id': lambda x: x is None},
{'name': 'test_in_class_parameterized.py', 'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'Tests', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith(
'test_in_class_parameterized.py')},
'parent_item_id': lambda x: x.startswith('test_in_class_parameterized.py')},
{'name': 'test_in_class_parameterized[param]', 'item_type': 'STEP',
'parent_item_id': lambda x: x.startswith('Tests')}
],
[
{'name': 'examples', 'item_type': 'SUITE',
'parent_item_id': lambda x: x is None},
{'name': 'params', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('examples')},
{'name': 'examples', 'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'params', 'item_type': 'SUITE', 'parent_item_id': lambda x: x.startswith('examples')},
{'name': 'test_in_class_parameterized.py', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith('params')},
{'name': 'Tests', 'item_type': 'SUITE',
'parent_item_id': lambda x: x.startswith(
'test_in_class_parameterized.py')},
'parent_item_id': lambda x: x.startswith('test_in_class_parameterized.py')},
{'name': 'test_in_class_parameterized[param]', 'item_type': 'STEP',
'parent_item_id': lambda x: x.startswith('Tests')}
],
[
{'name': 'examples/hierarchy/inner/test_inner_simple.py',
'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'examples/hierarchy/inner/test_inner_simple.py', 'item_type': 'SUITE',
'parent_item_id': lambda x: x is None},
{'name': 'test_simple', 'item_type': 'STEP',
'parent_item_id':
lambda x:
x.startswith('examples/hierarchy/inner/test_inner_simple.py')}
'parent_item_id': lambda x: x.startswith('examples/hierarchy/inner/test_inner_simple.py')}
],
[
{'name': 'examples\\hierarchy\\inner\\test_inner_simple.py',
'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'examples\\hierarchy\\inner\\test_inner_simple.py', 'item_type': 'SUITE',
'parent_item_id': lambda x: x is None},
{'name': 'test_simple', 'item_type': 'STEP',
'parent_item_id':
lambda x:
x.startswith('examples\\hierarchy\\inner\\test_inner_simple.py')}
'parent_item_id': lambda x: x.startswith('examples\\hierarchy\\inner\\test_inner_simple.py')}
],
[
{'name': 'hierarchy/inner/test_inner_simple.py',
'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'hierarchy/inner/test_inner_simple.py', 'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'test_simple', 'item_type': 'STEP',
'parent_item_id':
lambda x:
x.startswith('hierarchy/inner/test_inner_simple.py')}
'parent_item_id': lambda x: x.startswith('hierarchy/inner/test_inner_simple.py')}
],
[
{'name': 'inner/test_inner_simple.py',
'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'inner/test_inner_simple.py', 'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'test_simple', 'item_type': 'STEP',
'parent_item_id':
lambda x:
x.startswith('inner/test_inner_simple.py')}
'parent_item_id': lambda x: x.startswith('inner/test_inner_simple.py')}
],
[
{'name': 'test_inner_simple.py',
'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'test_simple', 'item_type': 'STEP',
'parent_item_id':
lambda x:
x.startswith('test_inner_simple.py')}
{'name': 'test_inner_simple.py', 'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'test_simple', 'item_type': 'STEP', 'parent_item_id': lambda x: x.startswith('test_inner_simple.py')}
],
[
{'name': 'examples/hierarchy/inner/test_inner_simple.py',
'item_type': 'SUITE', 'parent_item_id': lambda x: x is None},
{'name': 'test_simple', 'item_type': 'STEP',
'parent_item_id':
lambda x:
x.startswith('examples/hierarchy/inner/test_inner_simple.py')}
'parent_item_id': lambda x: x.startswith('examples/hierarchy/inner/test_inner_simple.py')}
],
[
{'name': 'examples/hierarchy/inner/test_inner_simple.py::test_simple',
'item_type': 'STEP', 'parent_item_id': lambda x: x is None}
{'name': 'examples/hierarchy/inner/test_inner_simple.py::test_simple', 'item_type': 'STEP',
'parent_item_id': lambda x: x is None}
],
[
{'name': 'examples/hierarchy/test_in_class_in_class.py::Tests::Test'
'::test_in_class_in_class',
{'name': 'examples/hierarchy/test_in_class_in_class.py::Tests::Test::test_in_class_in_class',
'item_type': 'STEP', 'parent_item_id': lambda x: x is None}
],
[
{'name': 'examples/test_simple',
'item_type': 'STEP', 'parent_item_id': lambda x: x is None}
{'name': 'examples/test_simple', 'item_type': 'STEP', 'parent_item_id': lambda x: x is None}
],
[
{'name': 'test_simple',
'item_type': 'STEP', 'parent_item_id': lambda x: x is None}
{'name': 'test_simple', 'item_type': 'STEP', 'parent_item_id': lambda x: x is None}
]
]

Expand Down

0 comments on commit 4f9a8f7

Please sign in to comment.