aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/traitlets/py3/patches
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-05-12 12:25:10 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-05-12 12:25:10 +0300
commit242ed6b08b9edde490fb7a16a6063e0bad8ccc88 (patch)
tree905ee9509e06949fb489ee0532ce5db7d2ea9c29 /contrib/python/traitlets/py3/patches
parent64d1f1262fd0f33992ff184fef10d806d64f74da (diff)
downloadydb-242ed6b08b9edde490fb7a16a6063e0bad8ccc88.tar.gz
intermediate changes
ref:0fbe94d885cb5449f7ff351c063c77f8b4f47715
Diffstat (limited to 'contrib/python/traitlets/py3/patches')
-rw-r--r--contrib/python/traitlets/py3/patches/01-fix-tests.patch65
1 files changed, 13 insertions, 52 deletions
diff --git a/contrib/python/traitlets/py3/patches/01-fix-tests.patch b/contrib/python/traitlets/py3/patches/01-fix-tests.patch
index a4b6de274d4..3b23932a030 100644
--- a/contrib/python/traitlets/py3/patches/01-fix-tests.patch
+++ b/contrib/python/traitlets/py3/patches/01-fix-tests.patch
@@ -1,83 +1,44 @@
--- contrib/python/traitlets/py3/traitlets/config/tests/test_configurable.py (index)
+++ contrib/python/traitlets/py3/traitlets/config/tests/test_configurable.py (working tree)
-@@ -22,7 +22,7 @@ from traitlets.traitlets import (
-
- from traitlets.config.loader import Config
-
+@@ -33,1 +33,1 @@ from traitlets.traitlets import (
-from ...tests._warnings import expected_warnings
+from traitlets.tests._warnings import expected_warnings
-
- class MyConfigurable(Configurable):
- a = Integer(1, help="The integer a.").tag(config=True)
--- contrib/python/traitlets/py3/traitlets/config/tests/test_application.py (index)
+++ contrib/python/traitlets/py3/traitlets/config/tests/test_application.py (working tree)
-@@ -629,6 +629,8 @@ class TestApplication(TestCase):
- self.assertEqual(app.running, False)
+@@ -635,2 +635,3 @@ class TestApplication(TestCase):
-
-+
+@mark.skip
def test_cli_multi_scalar(caplog):
- class App(Application):
- aliases = {"opt": "App.opt"}
-@@ -648,7 +650,7 @@ def test_cli_multi_scalar(caplog):
-
- class Root(Application):
- subcommands = {
-- 'sub1': ('traitlets.config.tests.test_application.Sub1', 'import string'),
-+ 'sub1': ('__tests__.config.tests.test_application.Sub1', 'import string'),
- }
-
-
+@@ -655,1 +656,1 @@ def test_cli_multi_scalar(caplog):
+- "sub1": ("traitlets.config.tests.test_application.Sub1", "import string"),
++ "sub1": ("__tests__.config.tests.test_application.Sub1", "import string"),
--- contrib/python/traitlets/py3/traitlets/tests/test_traitlets.py (index)
+++ contrib/python/traitlets/py3/traitlets/tests/test_traitlets.py (working tree)
-@@ -13,7 +13,7 @@ from unittest import TestCase
-
- import pytest
-
+@@ -63,1 +63,1 @@ from unittest import TestCase
-from ._warnings import expected_warnings
+from traitlets.tests._warnings import expected_warnings
- from traitlets import (
- HasTraits,
- MetaHasTraits,
--- contrib/python/traitlets/py3/traitlets/utils/tests/test_bunch.py (index)
+++ contrib/python/traitlets/py3/traitlets/utils/tests/test_bunch.py (working tree)
-@@ -1,4 +1,4 @@
+@@ -1,1 +1,1 @@
-from ..bunch import Bunch
+from traitlets.utils.bunch import Bunch
-
- def test_bunch():
- b = Bunch(x=5, y=10)
--- contrib/python/traitlets/py3/traitlets/utils/tests/test_decorators.py (index)
+++ contrib/python/traitlets/py3/traitlets/utils/tests/test_decorators.py (working tree)
-@@ -2,9 +2,9 @@ from unittest import TestCase
-
- from inspect import Signature, Parameter, signature
-
+@@ -4,2 +4,2 @@ from unittest import TestCase
-from ...traitlets import HasTraits, Int, Unicode
+from traitlets.traitlets import HasTraits, Int, Unicode
-
-from ..decorators import signature_has_traits
+from traitlets.utils.decorators import signature_has_traits
-
-
- class TestExpandSignature(TestCase):
--- contrib/python/traitlets/py3/traitlets/utils/tests/test_importstring.py (index)
+++ contrib/python/traitlets/py3/traitlets/utils/tests/test_importstring.py (working tree)
-@@ -8,7 +8,7 @@
- import os
- from unittest import TestCase
-
+@@ -11,1 +11,1 @@
-from ..importstring import import_item
+from traitlets.utils.importstring import import_item
-
-
- class TestImportItem(TestCase):
--- contrib/python/traitlets/py3/traitlets/tests/utils.py (index)
+++ contrib/python/traitlets/py3/traitlets/tests/utils.py (working tree)
@@ -1,10 +1,13 @@
- from subprocess import Popen, PIPE
import sys
+ from subprocess import PIPE, Popen
+import os
@@ -85,8 +46,8 @@
"""Get stdout, stderr, and exit code from running a command"""
- p = Popen(cmd, stdout=PIPE, stderr=PIPE)
+ env = os.environ.copy()
-+ env['Y_PYTHON_ENTRY_POINT'] = ':main'
++ env["Y_PYTHON_ENTRY_POINT"] = ":main"
+ p = Popen(cmd, stdout=PIPE, stderr=PIPE, env=env)
out, err = p.communicate()
- out = out.decode('utf8', 'replace')
- err = err.decode('utf8', 'replace')
+ out = out.decode("utf8", "replace")
+ err = err.decode("utf8", "replace")