summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3/0001-test_locale.py-correct-the-test-output-format.patch
blob: f9d2eadc1196af47f88f359be120eaaac6a82f2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From e11787d373baa6d7b0e0d94aff8ccd373203bfb1 Mon Sep 17 00:00:00 2001
From: Tim Orling <ticotimo@gmail.com>
Date: Wed, 16 Jun 2021 07:49:52 -0700
Subject: [PATCH] test_locale.py: correct the test 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".

Upstream-Status: Submitted [https://github.com/python/cpython/pull/15132]

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>


Refresh patch for upstream changes in 3.8.9

Signed-off-by: Tim Orling <timothy.t.orling@intel.com>
---
 Lib/test/test_locale.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py
index 39091c0..5050f3d 100644
--- a/Lib/test/test_locale.py
+++ b/Lib/test/test_locale.py
@@ -563,7 +563,7 @@ class TestMiscellaneous(unittest.TestCase):
             self.skipTest('test needs Turkish locale')
         loc = locale.getlocale(locale.LC_CTYPE)
         if verbose:
-            print('testing with %a' % (loc,), end=' ', flush=True)
+            print('testing with %a...' % (loc,), end=' ', flush=True)
         try:
             locale.setlocale(locale.LC_CTYPE, loc)
         except locale.Error as exc: