summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMingli Yu <mingli.yu@windriver.com>2019-08-05 02:38:18 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-11-18 14:42:13 +0000
commit3370830012eee08b158d0fb8a00640d94c2eb210 (patch)
treedb4128feb1f01692a29534c8681e0d5c1ee472d6
parenta2d2dba0bde2c1119eabb28fda23bcc7ea746ede (diff)
downloadpoky-3370830012eee08b158d0fb8a00640d94c2eb210.tar.gz
python3: fix the test_locale output format
Before this patch: # python3 -m test -v test_locale [snip] test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous) ... testing with ('tr_TR', 'ISO8859-9') ok [snip] After this patch: # python3 -m test -v test_locale [snip] test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous) ... testing with ('tr_TR', 'ISO8859-9')... ok [snip] Make the test ended with "... ok" is common in python unittest world, we should make it keep consistent with other test cases in case it may be ignored to record in the report if we use the common filter "... ok". [YOCTO #13298] (From OE-Core rev: 5b8022db53d9ef50ea35b034a6e27477038a508b) Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch46
-rw-r--r--meta/recipes-devtools/python/python3_3.7.4.bb1
2 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch
new file mode 100644
index 0000000000..35b7e0c480
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch
@@ -0,0 +1,46 @@
1From b94995e0c694ec9561efec0d1a59b323340e6105 Mon Sep 17 00:00:00 2001
2From: Mingli Yu <mingli.yu@windriver.com>
3Date: Mon, 5 Aug 2019 15:57:39 +0800
4Subject: [PATCH] test_locale.py: correct the test output format
5
6Before this patch:
7 # python3 -m test -v test_locale
8 [snip]
9 test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous) ... testing with ('tr_TR', 'ISO8859-9') ok
10 [snip]
11
12 After this patch:
13 # python3 -m test -v test_locale
14 [snip]
15 test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous) ... testing with ('tr_TR', 'ISO8859-9')... ok
16 [snip]
17
18 Make the test ended with "... ok" is common in python
19 unittest world, we should make it keep consistent
20 with other test cases in case it may be ignored to
21 record in the report if we use the common filter
22 "... ok".
23
24Upstream-Status: Submitted [https://github.com/python/cpython/pull/15132]
25
26Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
27---
28 Lib/test/test_locale.py | 2 +-
29 1 file changed, 1 insertion(+), 1 deletion(-)
30
31diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py
32index e2c2178..558d63c 100644
33--- a/Lib/test/test_locale.py
34+++ b/Lib/test/test_locale.py
35@@ -527,7 +527,7 @@ class TestMiscellaneous(unittest.TestCase):
36 self.skipTest('test needs Turkish locale')
37 loc = locale.getlocale(locale.LC_CTYPE)
38 if verbose:
39- print('testing with %a' % (loc,), end=' ', flush=True)
40+ print('testing with %a...' % (loc,), end=' ', flush=True)
41 locale.setlocale(locale.LC_CTYPE, loc)
42 self.assertEqual(loc, locale.getlocale(locale.LC_CTYPE))
43
44--
452.7.4
46
diff --git a/meta/recipes-devtools/python/python3_3.7.4.bb b/meta/recipes-devtools/python/python3_3.7.4.bb
index bd86d515d8..a3933b5ee9 100644
--- a/meta/recipes-devtools/python/python3_3.7.4.bb
+++ b/meta/recipes-devtools/python/python3_3.7.4.bb
@@ -27,6 +27,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
27 file://crosspythonpath.patch \ 27 file://crosspythonpath.patch \
28 file://reformat_sysconfig.py \ 28 file://reformat_sysconfig.py \
29 file://0001-Use-FLAG_REF-always-for-interned-strings.patch \ 29 file://0001-Use-FLAG_REF-always-for-interned-strings.patch \
30 file://0001-test_locale.py-correct-the-test-output-format.patch \
30 " 31 "
31 32
32SRC_URI_append_class-native = " \ 33SRC_URI_append_class-native = " \