diff options
author | maxim-yurchuk <maxim-yurchuk@yandex-team.com> | 2024-10-09 12:29:46 +0300 |
---|---|---|
committer | maxim-yurchuk <maxim-yurchuk@yandex-team.com> | 2024-10-09 13:14:22 +0300 |
commit | 9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 (patch) | |
tree | a8fb3181d5947c0d78cf402aa56e686130179049 /contrib/python/click | |
parent | a44b779cd359f06c3ebbef4ec98c6b38609d9d85 (diff) | |
download | ydb-9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80.tar.gz |
publishFullContrib: true for ydb
<HIDDEN_URL>
commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
Diffstat (limited to 'contrib/python/click')
4 files changed, 98 insertions, 0 deletions
diff --git a/contrib/python/click/py2/.yandex_meta/yamaker.yaml b/contrib/python/click/py2/.yandex_meta/yamaker.yaml new file mode 100644 index 0000000000..d07b451cf5 --- /dev/null +++ b/contrib/python/click/py2/.yandex_meta/yamaker.yaml @@ -0,0 +1,3 @@ +requirements: + - contrib/python/colorama + - library/python/symbols/python diff --git a/contrib/python/click/py2/patches/01-fix-tests.patch b/contrib/python/click/py2/patches/01-fix-tests.patch new file mode 100644 index 0000000000..537bcc9017 --- /dev/null +++ b/contrib/python/click/py2/patches/01-fix-tests.patch @@ -0,0 +1,50 @@ +--- contrib/python/click/py2/click/formatting.py (index) ++++ contrib/python/click/py2/click/formatting.py (working tree) +@@ -219,7 +219,7 @@ class HelpFormatter(object): + lines = wrapped_text.splitlines() + + if lines: +- self.write("{}\n".format(lines[0])) ++ self.write(u"{}\n".format(lines[0])) + + for line in lines[1:]: + self.write( +--- contrib/python/click/py2/tests/test_arguments.py (index) ++++ contrib/python/click/py2/tests/test_arguments.py (working tree) +@@ -78,6 +78,7 @@ def test_nargs_err(runner): + assert "Got unexpected extra argument (bar)" in result.output + + ++@pytest.mark.skip(reason="Can't monkeypatch sys.stdin.encoding in Arcadia Python") + def test_bytes_args(runner, monkeypatch): + @click.command() + @click.argument("arg") +--- contrib/python/click/py2/tests/test_imports.py (index) ++++ contrib/python/click/py2/tests/test_imports.py (working tree) +@@ -1,3 +1,4 @@ ++import os + import json + import subprocess + import sys +@@ -56,8 +57,10 @@ if WIN: + + + def test_light_imports(): ++ env = os.environ.copy() ++ env["Y_PYTHON_ENTRY_POINT"] = ":main" + c = subprocess.Popen( +- [sys.executable, "-"], stdin=subprocess.PIPE, stdout=subprocess.PIPE ++ [sys.executable, "-"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, env=env, + ) + rv = c.communicate(IMPORT_TEST)[0] + +--- contrib/python/click/py2/tests/test_termui.py (index) ++++ contrib/python/click/py2/tests/test_termui.py (working tree) +@@ -238,6 +238,7 @@ def test_choices_list_in_prompt(runner, monkeypatch): + assert "(none, day, week, month)" not in result.output + + ++@pytest.mark.skip + @pytest.mark.parametrize( + "file_kwargs", [{"mode": "rt"}, {"mode": "rb"}, {"lazy": True}] + ) diff --git a/contrib/python/click/py3/.yandex_meta/yamaker.yaml b/contrib/python/click/py3/.yandex_meta/yamaker.yaml new file mode 100644 index 0000000000..d07b451cf5 --- /dev/null +++ b/contrib/python/click/py3/.yandex_meta/yamaker.yaml @@ -0,0 +1,3 @@ +requirements: + - contrib/python/colorama + - library/python/symbols/python diff --git a/contrib/python/click/py3/patches/01-fix-tests.patch b/contrib/python/click/py3/patches/01-fix-tests.patch new file mode 100644 index 0000000000..5851660555 --- /dev/null +++ b/contrib/python/click/py3/patches/01-fix-tests.patch @@ -0,0 +1,42 @@ +--- contrib/python/click/py3/tests/test_arguments.py (index) ++++ contrib/python/click/py3/tests/test_arguments.py (working tree) +@@ -79,2 +79,3 @@ def test_nargs_err(runner): + ++@pytest.mark.skip(reason="Can't monkeypatch sys.stdin.encoding in Arcadia Python") + def test_bytes_args(runner, monkeypatch): +--- contrib/python/click/py3/tests/test_imports.py (index) ++++ contrib/python/click/py3/tests/test_imports.py (working tree) +@@ -1,3 +1,4 @@ ++import os + import json + import subprocess + import sys +@@ -55,8 +56,10 @@ if WIN: + + + def test_light_imports(): ++ env = os.environ.copy() ++ env["Y_PYTHON_ENTRY_POINT"] = ":main" + c = subprocess.Popen( +- [sys.executable, "-"], stdin=subprocess.PIPE, stdout=subprocess.PIPE ++ [sys.executable, "-"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, env=env, + ) + rv = c.communicate(IMPORT_TEST)[0] + rv = rv.decode("utf-8") +--- contrib/python/click/py3/tests/test_termui.py (index) ++++ contrib/python/click/py3/tests/test_termui.py (working tree) +@@ -220,6 +220,7 @@ def test_choices_list_in_prompt(runner, monkeypatch): + assert "(none, day, week, month)" not in result.output + + ++@pytest.mark.skip + @pytest.mark.parametrize( + "file_kwargs", [{"mode": "rt"}, {"mode": "rb"}, {"lazy": True}] + ) +--- contrib/python/click/py3/tests/test_utils.py (index) ++++ contrib/python/click/py3/tests/test_utils.py (working tree) +@@ -460,2 +460,2 @@ def test_expand_args(monkeypatch): +- assert "setup.cfg" in click.utils._expand_args(["*.cfg"]) +- assert os.path.join("docs", "conf.py") in click.utils._expand_args(["**/conf.py"]) ++ #assert "setup.cfg" in click.utils._expand_args(["*.cfg"]) ++ #assert os.path.join("docs", "conf.py") in click.utils._expand_args(["**/conf.py"]) |