Skip to content

Commit 6f7b911

Browse files
authored
Add skip_with_issue decorator (#17543)
1 parent dda6ca7 commit 6f7b911

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

ydb/tests/example/test_example.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
from ydb.tests.library.harness.kikimr_runner import KiKiMR
33
from ydb.tests.library.harness.kikimr_config import KikimrConfigGenerator
44
from ydb.tests.library.common.types import Erasure
5+
from ydb.tests.library.test_meta import skip_with_issue, link_test_case
56

67
import ydb
78

89

9-
class TestExample(object):
10+
class TestExample:
1011
"""
1112
Example for python test
1213
TODO: change description to yours
@@ -67,3 +68,11 @@ def test_example2(self): # TODO: change test name to yours
6768
There can be more than 1 test in the suite
6869
"""
6970
pass
71+
72+
@link_test_case("#999999998") # test can be linked with test-case issue in github
73+
def test_linked_with_testcase(self):
74+
pass
75+
76+
@skip_with_issue("#999999999") # test can be skipped with github issue
77+
def test_skipped_with_issue(self):
78+
pass

ydb/tests/example/ya.make

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ DEPENDS(
1313

1414
PEERDIR(
1515
ydb/tests/library
16+
ydb/tests/library/test_meta
1617
)
1718

1819
END()
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
import pytest
22

33
link_test_case = pytest.mark.test_case
4+
5+
6+
def skip_with_issue(issue_id):
7+
return pytest.mark.skip(reason=issue_id)

0 commit comments

Comments
 (0)