aboutsummaryrefslogtreecommitdiffstats
path: root/library/python/pytest
diff options
context:
space:
mode:
authorromakudlakov <romakudlakov@yandex-team.com>2023-01-24 11:21:44 +0300
committerromakudlakov <romakudlakov@yandex-team.com>2023-01-24 11:21:44 +0300
commit789a43e036d1e1a28c8444330ad13c0a9e7b5235 (patch)
tree1f68e5554afacea33fedc2a278bb0e23c237a031 /library/python/pytest
parent2c3b726f8b11cffca0dcb9a41aa14c7647e8f837 (diff)
downloadydb-789a43e036d1e1a28c8444330ad13c0a9e7b5235.tar.gz
Add assert to check empty entry
Add assert that entry is not empty
Diffstat (limited to 'library/python/pytest')
-rw-r--r--library/python/pytest/plugins/ya.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/python/pytest/plugins/ya.py b/library/python/pytest/plugins/ya.py
index e5d3ec09e5..0b3c8127e4 100644
--- a/library/python/pytest/plugins/ya.py
+++ b/library/python/pytest/plugins/ya.py
@@ -646,7 +646,7 @@ class TestItem(object):
if report_teststatus == 'xfailed':
self._status = 'xfail'
- self.set_error(report.wasxfail, 'imp')
+ self.set_error(report.wasxfail or 'test was marked as xfail', 'imp')
elif report_teststatus == 'xpassed':
self._status = 'xpass'
self.set_error("Test unexpectedly passed")
@@ -678,6 +678,7 @@ class TestItem(object):
return self._error
def set_error(self, entry, marker='bad'):
+ assert entry != ""
if isinstance(entry, _pytest.reports.BaseReport):
self._error = get_formatted_error(entry)
else: