aboutsummaryrefslogtreecommitdiffstats
path: root/library/python/pytest/plugins
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-04-09 13:50:59 +0300
committershadchin <shadchin@yandex-team.ru>2022-04-09 13:50:59 +0300
commit67ade9a1ace3bdb3b25b2a8e66cd46d94d89a7be (patch)
tree381a2ec0007a55bc4e06b9727dbb29cc960ad7ce /library/python/pytest/plugins
parent24ac00d7ea42b18cefe755792df13ee4116ad5e7 (diff)
downloadydb-67ade9a1ace3bdb3b25b2a8e66cd46d94d89a7be.tar.gz
Remove unnecessary patch from Python 3
ref:08457aac212d00dad336d739a11d619cf2882ae3
Diffstat (limited to 'library/python/pytest/plugins')
-rw-r--r--library/python/pytest/plugins/conftests.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/python/pytest/plugins/conftests.py b/library/python/pytest/plugins/conftests.py
index 522041f5a7..3c855c9c11 100644
--- a/library/python/pytest/plugins/conftests.py
+++ b/library/python/pytest/plugins/conftests.py
@@ -11,10 +11,10 @@ orig_getfile = inspect.getfile
def getfile(object):
- res = orig_getfile(object)
- if inspect.ismodule(object):
- if not res and getattr(object, '__orig_file__'):
- res = object.__orig_file__
+ if inspect.ismodule(object) and getattr(object, '__orig_file__', None):
+ res = object.__orig_file__
+ else:
+ res = orig_getfile(object)
return res
inspect.getfile = getfile