diff options
author | deshevoy <deshevoy@yandex-team.ru> | 2022-02-10 16:46:57 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:57 +0300 |
commit | 28148f76dbfcc644d96427d41c92f36cbf2fdc6e (patch) | |
tree | b83306b6e37edeea782e9eed673d89286c4fef35 /library/python/pytest/plugins/conftests.py | |
parent | e988f30484abe5fdeedcc7a5d3c226c01a21800c (diff) | |
download | ydb-28148f76dbfcc644d96427d41c92f36cbf2fdc6e.tar.gz |
Restoring authorship annotation for <deshevoy@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/python/pytest/plugins/conftests.py')
-rw-r--r-- | library/python/pytest/plugins/conftests.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/library/python/pytest/plugins/conftests.py b/library/python/pytest/plugins/conftests.py index 96456da28c..522041f5a7 100644 --- a/library/python/pytest/plugins/conftests.py +++ b/library/python/pytest/plugins/conftests.py @@ -23,23 +23,23 @@ conftest_modules = [] @hookimpl(trylast=True) def pytest_load_initial_conftests(early_config, parser, args): - conftests = filter(lambda name: name.endswith(".conftest"), sys.extra_modules) + conftests = filter(lambda name: name.endswith(".conftest"), sys.extra_modules) - def conftest_key(name): - if not name.startswith("__tests__."): - # Make __tests__ come last - return "_." + name - return name + def conftest_key(name): + if not name.startswith("__tests__."): + # Make __tests__ come last + return "_." + name + return name - for name in sorted(conftests, key=conftest_key): - mod = importlib.import_module(name) + for name in sorted(conftests, key=conftest_key): + mod = importlib.import_module(name) if os.getenv("CONFTEST_LOAD_POLICY") != "LOCAL": mod.__orig_file__ = mod.__file__ mod.__file__ = "" - conftest_modules.append(mod) + conftest_modules.append(mod) early_config.pluginmanager.consider_conftest(mod) - - + + def getconftestmodules(*args, **kwargs): return conftest_modules |