diff options
author | somov <somov@yandex-team.com> | 2023-05-24 14:44:19 +0300 |
---|---|---|
committer | somov <somov@yandex-team.com> | 2023-05-24 14:44:19 +0300 |
commit | f9c5f901143b9663f0908303bd9a9390662bae1a (patch) | |
tree | e117b3254778688fd0edd879c537e850b3025e74 /library/python/pytest/plugins/ya.py | |
parent | 664ed7d3e32cb7b72950a29d1c7c38ce1898e7fb (diff) | |
download | ydb-f9c5f901143b9663f0908303bd9a9390662bae1a.tar.gz |
Revert commit rXXXXXX (Preserve tests order when splitting by chunks)
Diffstat (limited to 'library/python/pytest/plugins/ya.py')
-rw-r--r-- | library/python/pytest/plugins/ya.py | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/library/python/pytest/plugins/ya.py b/library/python/pytest/plugins/ya.py index a9ad446d67..1129609c7c 100644 --- a/library/python/pytest/plugins/ya.py +++ b/library/python/pytest/plugins/ya.py @@ -429,8 +429,6 @@ def pytest_deselected(items): @pytest.hookimpl(trylast=True) def pytest_collection_modifyitems(items, config): - item_ids_order = [item.nodeid for item in items] - def filter_items(filters): filtered_items = [] deselected_items = [] @@ -492,23 +490,10 @@ def pytest_collection_modifyitems(items, config): items_by_classes[class_name].append(item) else: res.append([item]) - chunk_items = test_splitter.get_splitted_tests(res, modulo, modulo_index, partition_mode, is_sorted=True) - - item_by_id = {} - for item_group in chunk_items: - for item in item_group: - item_by_id[item.nodeid] = item - - # Should preserve the original order of the items. - # It is crucial for the correct application of test fixtures. - # See DEVTOOLSSUPPORT-28496 for details. items[:] = [] - for item_id in item_ids_order: - item = item_by_id.get(item_id) - if item is not None: - items.append(item) - + for item in chunk_items: + items.extend(item) yatest_logger.info("Modulo %s tests are: %s", modulo_index, chunk_items) if config.option.mode == yatest_lib.ya.RunMode.Run: |