aboutsummaryrefslogtreecommitdiffstats
path: root/library/python/pytest/main.py
diff options
context:
space:
mode:
authordeshevoy <deshevoy@yandex-team.ru>2022-02-10 16:46:57 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:57 +0300
commit28148f76dbfcc644d96427d41c92f36cbf2fdc6e (patch)
treeb83306b6e37edeea782e9eed673d89286c4fef35 /library/python/pytest/main.py
parente988f30484abe5fdeedcc7a5d3c226c01a21800c (diff)
downloadydb-28148f76dbfcc644d96427d41c92f36cbf2fdc6e.tar.gz
Restoring authorship annotation for <deshevoy@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/python/pytest/main.py')
-rw-r--r--library/python/pytest/main.py38
1 files changed, 19 insertions, 19 deletions
diff --git a/library/python/pytest/main.py b/library/python/pytest/main.py
index 355623ff0e..6296bd6f0f 100644
--- a/library/python/pytest/main.py
+++ b/library/python/pytest/main.py
@@ -2,10 +2,10 @@ import os
import sys
import time
-import __res
+import __res
FORCE_EXIT_TESTSFAILED_ENV = 'FORCE_EXIT_TESTSFAILED'
-
+
def main():
import library.python.pytest.context as context
@@ -39,12 +39,12 @@ def main():
import library.python.pytest.plugins.ya as ya
import library.python.pytest.plugins.conftests as conftests
- import _pytest.assertion
- from _pytest.monkeypatch import MonkeyPatch
+ import _pytest.assertion
+ from _pytest.monkeypatch import MonkeyPatch
from . import rewrite
- m = MonkeyPatch()
- m.setattr(_pytest.assertion.rewrite, "AssertionRewritingHook", rewrite.AssertionRewritingHook)
-
+ m = MonkeyPatch()
+ m.setattr(_pytest.assertion.rewrite, "AssertionRewritingHook", rewrite.AssertionRewritingHook)
+
prefix = '__tests__.'
test_modules = [
@@ -56,18 +56,18 @@ def main():
if isinstance(doctest_packages, bytes):
doctest_packages = doctest_packages.decode('utf-8')
doctest_packages = doctest_packages.split()
-
- def is_doctest_module(name):
- for package in doctest_packages:
+
+ def is_doctest_module(name):
+ for package in doctest_packages:
if name == package or name.startswith(str(package) + "."):
- return True
- return False
-
- doctest_modules = [
- name for name in sys.extra_modules
- if is_doctest_module(name)
- ]
-
+ return True
+ return False
+
+ doctest_modules = [
+ name for name in sys.extra_modules
+ if is_doctest_module(name)
+ ]
+
def remove_user_site(paths):
site_paths = ('site-packages', 'site-python')
@@ -86,7 +86,7 @@ def main():
sys.path = remove_user_site(sys.path)
rc = pytest.main(plugins=[
- collection.CollectionPlugin(test_modules, doctest_modules),
+ collection.CollectionPlugin(test_modules, doctest_modules),
ya,
conftests,
])