summaryrefslogtreecommitdiffstats
path: root/contrib/python/wcwidth/py3/patches/01-fix-tests.patch
blob: f36c809b86decb05660cd66eaf3bfb0ca4be9f2f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- contrib/python/wcwidth/py3/tests/test_benchmarks.py	(index)
+++ contrib/python/wcwidth/py3/tests/test_benchmarks.py	(working tree)
@@ -186 +186,2 @@ def test_iter_sequences_mixed(benchmark):
-UDHR_FILE = os.path.join(os.path.dirname(__file__), 'udhr_combined.txt')
+import yatest.common as yc
+UDHR_FILE = os.path.join(os.path.dirname(yc.source_path(__file__)), 'udhr_combined.txt')
--- contrib/python/wcwidth/py3/tests/test_emojis.py	(index)
+++ contrib/python/wcwidth/py3/tests/test_emojis.py	(working tree)
@@ -136 +136,2 @@ def read_sequences_from_file(filename):
-    with open(os.path.join(os.path.dirname(__file__), filename), encoding='utf-8') as fp:
+    import yatest.common as yc
+    with open(os.path.join(os.path.dirname(yc.source_path(__file__)), filename), encoding='utf-8') as fp:
--- contrib/python/wcwidth/py3/tests/test_grapheme.py	(index)
+++ contrib/python/wcwidth/py3/tests/test_grapheme.py	(working tree)
@@ -60 +60,2 @@ def read_grapheme_break_test():
-    test_file = os.path.join(os.path.dirname(__file__), 'GraphemeBreakTest.txt')
+    import yatest.common as yc
+    test_file = os.path.join(os.path.dirname(yc.source_path(__file__)), 'GraphemeBreakTest.txt')