diff options
author | prime <prime@yandex-team.ru> | 2022-02-10 16:46:00 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:00 +0300 |
commit | 3695a7cd42b74a4987d8d5a8f2e2443556998943 (patch) | |
tree | ee79ee9294a61ee00e647684b3700d0a87e102a3 /library/python | |
parent | 4d8b546b89b5afc08cf3667e176271c7ba935f33 (diff) | |
download | ydb-3695a7cd42b74a4987d8d5a8f2e2443556998943.tar.gz |
Restoring authorship annotation for <prime@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/python')
-rw-r--r-- | library/python/pytest/plugins/collection.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/library/python/pytest/plugins/collection.py b/library/python/pytest/plugins/collection.py index e36f47a78f..35cfcb131b 100644 --- a/library/python/pytest/plugins/collection.py +++ b/library/python/pytest/plugins/collection.py @@ -77,7 +77,7 @@ class DoctestModule(LoadedModule): reraise(etype, type(exc)('{}\n{}'.format(exc, msg)), tb) -# NOTE: Since we are overriding collect method of pytest session, pytest hooks are not invoked during collection. +# NOTE: Since we are overriding collect method of pytest session, pytest hooks are not invoked during collection. def pytest_ignore_collect(module, session, filenames_from_full_filters, accept_filename_predicate): if session.config.option.mode == 'list': return not accept_filename_predicate(module.name) @@ -87,12 +87,12 @@ def pytest_ignore_collect(module, session, filenames_from_full_filters, accept_f test_file_filter = getattr(session.config.option, 'test_file_filter', None) if test_file_filter is None: - return False + return False if module.name != test_file_filter.replace('/', '.'): return True - return False - - + return False + + class CollectionPlugin(object): def __init__(self, test_modules, doctest_modules): self._test_modules = test_modules @@ -114,7 +114,7 @@ class CollectionPlugin(object): for test_module in self._test_modules: module = LoadedModule.from_parent(name=test_module, parent=session) if not pytest_ignore_collect(module, session, filenames_filter, accept_filename_predicate): - yield module + yield module if os.environ.get('YA_PYTEST_DISABLE_DOCTEST', 'no') == 'no': module = DoctestModule.from_parent(name=test_module, parent=session) |