Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | From 46856e692377d21be3562f6f90c242f5c9594ae2 Mon Sep 17 00:00:00 2001 |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 2 | From: Mingli Yu <mingli.yu@windriver.com> |
| 3 | Date: Mon, 5 Aug 2019 15:57:39 +0800 |
| 4 | Subject: [PATCH] test_locale.py: correct the test output format |
| 5 | |
| 6 | Before 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 | |
| 24 | Upstream-Status: Submitted [https://github.com/python/cpython/pull/15132] |
| 25 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 26 | Rebased for 3.9.4, still not accepted upstream Signed-off-by: Alejandro Hernandez <alejandro@enedino.org> |
| 27 | |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 28 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 29 | |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 30 | --- |
| 31 | Lib/test/test_locale.py | 2 +- |
| 32 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 33 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 34 | diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py |
| 35 | index f844e62..04df0c2 100644 |
| 36 | --- a/Lib/test/test_locale.py |
| 37 | +++ b/Lib/test/test_locale.py |
| 38 | @@ -564,7 +564,7 @@ class TestMiscellaneous(unittest.TestCase): |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 39 | self.skipTest('test needs Turkish locale') |
| 40 | loc = locale.getlocale(locale.LC_CTYPE) |
| 41 | if verbose: |
| 42 | - print('testing with %a' % (loc,), end=' ', flush=True) |
| 43 | + print('testing with %a...' % (loc,), end=' ', flush=True) |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 44 | try: |
| 45 | locale.setlocale(locale.LC_CTYPE, loc) |
| 46 | except locale.Error as exc: |