diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-04-26 13:38:24 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-04-26 13:38:24 +0300 |
commit | d5542c891803641fb11f2edf0d71e6004a5e9c38 (patch) | |
tree | 592fd52d5412775f103fab3beb0083c08de7837f /library/cpp/testing/unittest/pytests/test_tear_down.py | |
parent | e42e29335e2001970f95535e7557d5c27519f29f (diff) | |
download | ydb-d5542c891803641fb11f2edf0d71e6004a5e9c38.tar.gz |
intermediate changes
ref:ba3b994bce107b5d5ed74af8bebe6df02576505a
Diffstat (limited to 'library/cpp/testing/unittest/pytests/test_tear_down.py')
-rw-r--r-- | library/cpp/testing/unittest/pytests/test_tear_down.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/library/cpp/testing/unittest/pytests/test_tear_down.py b/library/cpp/testing/unittest/pytests/test_tear_down.py new file mode 100644 index 0000000000..5aec40198d --- /dev/null +++ b/library/cpp/testing/unittest/pytests/test_tear_down.py @@ -0,0 +1,17 @@ +import yatest.common as ya_common + + +def test_sanity(): + test_path = ya_common.binary_path("library/cpp/testing/unittest/pytests/test_subject/library-cpp-testing-unittest-pytests-test_subject") + + tests = ya_common.execute([test_path, '-A']).std_out \ + .decode().strip().split('\n') + + assert tests + + for test in tests: + name = test.split('::')[1] + res = ya_common.execute([test_path, test], check_exit_code=False) + assert res.exit_code != 0 + lines = res.std_err.decode().split('\n') + assert f"{name}: TearDown is ran" in lines |