aboutsummaryrefslogtreecommitdiffstats
path: root/library/python/pytest/plugins
diff options
context:
space:
mode:
authorkrock21 <krock21@yandex-team.ru>2022-02-10 16:46:02 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:02 +0300
commit937a6bb8d7c82d8d9d717f2bf6ce6c592a443641 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/python/pytest/plugins
parent4aae166b5d23fd02653919f43e2015cd636fa6fd (diff)
downloadydb-937a6bb8d7c82d8d9d717f2bf6ce6c592a443641.tar.gz
Restoring authorship annotation for <krock21@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/python/pytest/plugins')
-rw-r--r--library/python/pytest/plugins/collection.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/library/python/pytest/plugins/collection.py b/library/python/pytest/plugins/collection.py
index 8292d750a8..e36f47a78f 100644
--- a/library/python/pytest/plugins/collection.py
+++ b/library/python/pytest/plugins/collection.py
@@ -1,6 +1,6 @@
import os
import sys
-from six import reraise
+from six import reraise
import py
@@ -61,19 +61,19 @@ class DoctestModule(LoadedModule):
optionflags = _pytest.doctest.get_optionflags(self)
runner = doctest.DebugRunner(verbose=0, optionflags=optionflags)
- try:
+ try:
for test in finder.find(module, self.name[:-len('.py')]):
- if test.examples: # skip empty doctests
+ if test.examples: # skip empty doctests
yield getattr(_pytest.doctest.DoctestItem, 'from_parent', _pytest.doctest.DoctestItem)(
name=test.name,
parent=self,
runner=runner,
dtest=test)
except Exception:
- import logging
- logging.exception('DoctestModule failed, probably you can add NO_DOCTESTS() macro to ya.make')
- etype, exc, tb = sys.exc_info()
- msg = 'DoctestModule failed, probably you can add NO_DOCTESTS() macro to ya.make'
+ import logging
+ logging.exception('DoctestModule failed, probably you can add NO_DOCTESTS() macro to ya.make')
+ etype, exc, tb = sys.exc_info()
+ msg = 'DoctestModule failed, probably you can add NO_DOCTESTS() macro to ya.make'
reraise(etype, type(exc)('{}\n{}'.format(exc, msg)), tb)
@@ -116,13 +116,13 @@ class CollectionPlugin(object):
if not pytest_ignore_collect(module, session, filenames_filter, accept_filename_predicate):
yield module
- if os.environ.get('YA_PYTEST_DISABLE_DOCTEST', 'no') == 'no':
+ if os.environ.get('YA_PYTEST_DISABLE_DOCTEST', 'no') == 'no':
module = DoctestModule.from_parent(name=test_module, parent=session)
- if not pytest_ignore_collect(module, session, filenames_filter, accept_filename_predicate):
- yield module
+ if not pytest_ignore_collect(module, session, filenames_filter, accept_filename_predicate):
+ yield module
- if os.environ.get('YA_PYTEST_DISABLE_DOCTEST', 'no') == 'no':
- for doctest_module in self._doctest_modules:
+ if os.environ.get('YA_PYTEST_DISABLE_DOCTEST', 'no') == 'no':
+ for doctest_module in self._doctest_modules:
yield DoctestModule.from_parent(name=doctest_module, parent=session, namespace=False)
session.collect = collect