diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-07-16 06:55:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-16 15:55:26 +0200 |
commit | 93d36a5bcec8e55026b9a749c8310b1ce490d15e (patch) | |
tree | 9985de71d1ecb0f54ab69246918ee54a00831b9c /Lib/test/test_regrtest.py | |
parent | 80844d1ebc03e1cf3ffdeb47751522499e90b0bc (diff) | |
download | cpython-git-93d36a5bcec8e55026b9a749c8310b1ce490d15e.tar.gz |
bpo-44647: Add a permanent Unicode-valued env var to regrtest (GH-27187) (#27191)
(cherry picked from commit 7915c96ffd7ddc5cb6d54015ee4c31255a416892)
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib/test/test_regrtest.py')
-rw-r--r-- | Lib/test/test_regrtest.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py index 054776ccf4..75fa6f2d3f 100644 --- a/Lib/test/test_regrtest.py +++ b/Lib/test/test_regrtest.py @@ -19,7 +19,7 @@ import unittest from test import libregrtest from test import support from test.support import os_helper -from test.libregrtest import utils +from test.libregrtest import utils, setup Py_DEBUG = hasattr(sys, 'gettotalrefcount') @@ -1298,6 +1298,14 @@ class ArgsTestCase(BaseTestCase): self.assertIn("Warning -- Uncaught thread exception", output) self.assertIn("Exception: bug in thread", output) + def test_unicode_guard_env(self): + guard = os.environ.get(setup.UNICODE_GUARD_ENV) + self.assertIsNotNone(guard, f"{setup.UNICODE_GUARD_ENV} not set") + if guard != "\N{SMILING FACE WITH SUNGLASSES}": + # Skip to signify that the env var value was changed by the user; + # possibly to something ASCII to work around Unicode issues. + self.skipTest("Modified guard") + def test_cleanup(self): dirname = os.path.join(self.tmptestdir, "test_python_123") os.mkdir(dirname) |