summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-06-25 12:04:56 (GMT)
committerGitHub <noreply@github.com>2020-06-25 12:04:56 (GMT)
commitf547d06ea7db23bb0a2cf81ff85478746efa958e (patch)
tree25c7d3a056895396c420cf8f161f3542ecceb83b
parent7318f0ab234e1c60a19eeea4e5968fb5d4fd70af (diff)
downloadcpython-f547d06ea7db23bb0a2cf81ff85478746efa958e.zip
cpython-f547d06ea7db23bb0a2cf81ff85478746efa958e.tar.gz
cpython-f547d06ea7db23bb0a2cf81ff85478746efa958e.tar.bz2
bpo-41113: Fix test_warnings on non-Western locales. (GH-21143)
(cherry picked from commit 0f8ec1fff01173803645ad6a8aea24997bf66fc1) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
-rw-r--r--Lib/test/test_warnings/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_warnings/__init__.py b/Lib/test/test_warnings/__init__.py
index 985adc1..7b0d06b 100644
--- a/Lib/test/test_warnings/__init__.py
+++ b/Lib/test/test_warnings/__init__.py
@@ -1199,13 +1199,13 @@ class EnvironmentVariableTests(BaseTest):
@unittest.skipUnless(sys.getfilesystemencoding() != 'ascii',
'requires non-ascii filesystemencoding')
def test_nonascii(self):
+ PYTHONWARNINGS="ignore:DeprecationWarning" + (support.FS_NONASCII or '')
rc, stdout, stderr = assert_python_ok("-c",
"import sys; sys.stdout.write(str(sys.warnoptions))",
PYTHONIOENCODING="utf-8",
- PYTHONWARNINGS="ignore:DeprecaciónWarning",
+ PYTHONWARNINGS=PYTHONWARNINGS,
PYTHONDEVMODE="")
- self.assertEqual(stdout,
- "['ignore:DeprecaciónWarning']".encode('utf-8'))
+ self.assertEqual(stdout, str([PYTHONWARNINGS]).encode())
class CEnvironmentVariableTests(EnvironmentVariableTests, unittest.TestCase):
module = c_warnings