diff options
| author | maxim-yurchuk <[email protected]> | 2024-10-09 12:29:46 +0300 |
|---|---|---|
| committer | maxim-yurchuk <[email protected]> | 2024-10-09 13:14:22 +0300 |
| commit | 9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 (patch) | |
| tree | a8fb3181d5947c0d78cf402aa56e686130179049 /contrib/python/chardet/py3/patches/01-fix-tests.patch | |
| parent | a44b779cd359f06c3ebbef4ec98c6b38609d9d85 (diff) | |
publishFullContrib: true for ydb
<HIDDEN_URL>
commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
Diffstat (limited to 'contrib/python/chardet/py3/patches/01-fix-tests.patch')
| -rw-r--r-- | contrib/python/chardet/py3/patches/01-fix-tests.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/python/chardet/py3/patches/01-fix-tests.patch b/contrib/python/chardet/py3/patches/01-fix-tests.patch new file mode 100644 index 00000000000..5c3f808bdf8 --- /dev/null +++ b/contrib/python/chardet/py3/patches/01-fix-tests.patch @@ -0,0 +1,26 @@ +--- contrib/python/chardet/py3/test.py (index) ++++ contrib/python/chardet/py3/test.py (working tree) +@@ -45,7 +45,8 @@ EXPECTED_FAILURES = { + + def gen_test_params(): + """Yields tuples of paths and encodings to use for test_encoding_detection""" +- base_path = relpath(join(dirname(realpath(__file__)), "tests")) ++ import yatest.common ++ base_path = yatest.common.work_path('test_data/tests') + for encoding in listdir(base_path): + path = join(base_path, encoding) + # Skip files in tests directory +@@ -68,8 +69,11 @@ def gen_test_params(): + continue + full_path = join(path, file_name) + test_case = full_path, encoding +- if full_path in EXPECTED_FAILURES: +- test_case = pytest.param(*test_case, marks=pytest.mark.xfail) ++ name_test = full_path.split("/test_data/")[-1] ++ if name_test in EXPECTED_FAILURES: ++ test_case = pytest.param(*test_case, marks=pytest.mark.xfail, id=name_test) ++ else: ++ test_case = pytest.param(*test_case, id=name_test) + yield test_case + + |
