mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-44647: Add a permanent Unicode-valued env var to regrtest (#27187)
This commit is contained in:
parent
29358e93f2
commit
7915c96ffd
3 changed files with 23 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue