From ac5aa42143c88e9616c4b6986cf89dad3cdb99ec Mon Sep 17 00:00:00 2001 From: robot-piglet Date: Thu, 10 Oct 2024 15:49:43 +0300 Subject: Intermediate changes commit_hash:ec2de59c841270f9f65ce794885833c6f4800a62 --- contrib/python/websocket-client/py2/patches/01-fix-tests.patch | 8 ++++---- contrib/python/websocket-client/py2/websocket/tests/test_http.py | 4 ++-- .../python/websocket-client/py2/websocket/tests/test_websocket.py | 4 ++-- contrib/python/websocket-client/py3/patches/01-fix-tests.patch | 8 ++++---- contrib/python/websocket-client/py3/websocket/tests/test_http.py | 4 ++-- .../python/websocket-client/py3/websocket/tests/test_websocket.py | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) (limited to 'contrib/python') diff --git a/contrib/python/websocket-client/py2/patches/01-fix-tests.patch b/contrib/python/websocket-client/py2/patches/01-fix-tests.patch index 83acc3d9c6a..ba276c9cee0 100644 --- a/contrib/python/websocket-client/py2/patches/01-fix-tests.patch +++ b/contrib/python/websocket-client/py2/patches/01-fix-tests.patch @@ -5,8 +5,8 @@ def __init__(self, fname): SockMock.__init__(self) - path = os.path.join(os.path.dirname(__file__), fname) -+ import yatest.common -+ path = yatest.common.source_path(os.path.join('contrib/python/websocket-client/py2/websocket/tests', fname)) ++ import yatest.common as yc ++ path = os.path.join(os.path.dirname(yc.source_path(__file__)), fname) with open(path, "rb") as f: self.add_packet(f.read()) @@ -26,8 +26,8 @@ def __init__(self, fname): SockMock.__init__(self) - path = os.path.join(os.path.dirname(__file__), fname) -+ import yatest.common -+ path = yatest.common.source_path(os.path.join('contrib/python/websocket-client/py2/websocket/tests', fname)) ++ import yatest.common as yc ++ path = os.path.join(os.path.dirname(yc.source_path(__file__)), fname) with open(path, "rb") as f: self.add_packet(f.read()) diff --git a/contrib/python/websocket-client/py2/websocket/tests/test_http.py b/contrib/python/websocket-client/py2/websocket/tests/test_http.py index f08bd0c91c9..8271e7717d9 100644 --- a/contrib/python/websocket-client/py2/websocket/tests/test_http.py +++ b/contrib/python/websocket-client/py2/websocket/tests/test_http.py @@ -66,8 +66,8 @@ class HeaderSockMock(SockMock): def __init__(self, fname): SockMock.__init__(self) - import yatest.common - path = yatest.common.source_path(os.path.join('contrib/python/websocket-client/py2/websocket/tests', fname)) + import yatest.common as yc + path = os.path.join(os.path.dirname(yc.source_path(__file__)), fname) with open(path, "rb") as f: self.add_packet(f.read()) diff --git a/contrib/python/websocket-client/py2/websocket/tests/test_websocket.py b/contrib/python/websocket-client/py2/websocket/tests/test_websocket.py index b1b66b8a712..b4aff8f7930 100644 --- a/contrib/python/websocket-client/py2/websocket/tests/test_websocket.py +++ b/contrib/python/websocket-client/py2/websocket/tests/test_websocket.py @@ -99,8 +99,8 @@ class HeaderSockMock(SockMock): def __init__(self, fname): SockMock.__init__(self) - import yatest.common - path = yatest.common.source_path(os.path.join('contrib/python/websocket-client/py2/websocket/tests', fname)) + import yatest.common as yc + path = os.path.join(os.path.dirname(yc.source_path(__file__)), fname) with open(path, "rb") as f: self.add_packet(f.read()) diff --git a/contrib/python/websocket-client/py3/patches/01-fix-tests.patch b/contrib/python/websocket-client/py3/patches/01-fix-tests.patch index db6ba4b667c..28d7c74be30 100644 --- a/contrib/python/websocket-client/py3/patches/01-fix-tests.patch +++ b/contrib/python/websocket-client/py3/patches/01-fix-tests.patch @@ -5,8 +5,8 @@ def __init__(self, fname): SockMock.__init__(self) - path = os.path.join(os.path.dirname(__file__), fname) -+ import yatest.common -+ path = yatest.common.source_path(os.path.join('contrib/python/websocket-client/py3/websocket/tests', fname)) ++ import yatest.common as yc ++ path = os.path.join(os.path.dirname(yc.source_path(__file__)), fname) with open(path, "rb") as f: self.add_packet(f.read()) @@ -17,8 +17,8 @@ def __init__(self, fname): SockMock.__init__(self) - path = os.path.join(os.path.dirname(__file__), fname) -+ import yatest.common -+ path = yatest.common.source_path(os.path.join('contrib/python/websocket-client/py3/websocket/tests', fname)) ++ import yatest.common as yc ++ path = os.path.join(os.path.dirname(yc.source_path(__file__)), fname) with open(path, "rb") as f: self.add_packet(f.read()) diff --git a/contrib/python/websocket-client/py3/websocket/tests/test_http.py b/contrib/python/websocket-client/py3/websocket/tests/test_http.py index b8b363acc45..72465c22057 100644 --- a/contrib/python/websocket-client/py3/websocket/tests/test_http.py +++ b/contrib/python/websocket-client/py3/websocket/tests/test_http.py @@ -81,8 +81,8 @@ class SockMock: class HeaderSockMock(SockMock): def __init__(self, fname): SockMock.__init__(self) - import yatest.common - path = yatest.common.source_path(os.path.join('contrib/python/websocket-client/py3/websocket/tests', fname)) + import yatest.common as yc + path = os.path.join(os.path.dirname(yc.source_path(__file__)), fname) with open(path, "rb") as f: self.add_packet(f.read()) diff --git a/contrib/python/websocket-client/py3/websocket/tests/test_websocket.py b/contrib/python/websocket-client/py3/websocket/tests/test_websocket.py index b665548cda0..892312a2dbd 100644 --- a/contrib/python/websocket-client/py3/websocket/tests/test_websocket.py +++ b/contrib/python/websocket-client/py3/websocket/tests/test_websocket.py @@ -83,8 +83,8 @@ class SockMock: class HeaderSockMock(SockMock): def __init__(self, fname): SockMock.__init__(self) - import yatest.common - path = yatest.common.source_path(os.path.join('contrib/python/websocket-client/py3/websocket/tests', fname)) + import yatest.common as yc + path = os.path.join(os.path.dirname(yc.source_path(__file__)), fname) with open(path, "rb") as f: self.add_packet(f.read()) -- cgit v1.3