Skip to content

Commit a9c7bc0

Browse files
committed
fixed test_regrtest
added environment variable value "PYTHONREGRTEST_UNICODE_GUARD0" when calling the test directly
1 parent 23cda58 commit a9c7bc0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/test_regrtest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,6 +1931,8 @@ def test_print_warning(self):
19311931

19321932
def test_unicode_guard_env(self):
19331933
guard = os.environ.get(setup.UNICODE_GUARD_ENV)
1934+
# if you run the test directly,
1935+
# then look at the if __name__ == '__main__' of this file
19341936
self.assertIsNotNone(guard, f"{setup.UNICODE_GUARD_ENV} not set")
19351937
if guard.isascii():
19361938
# Skip to signify that the env var value was changed by the user;
@@ -2546,4 +2548,5 @@ def test_test_result_get_state(self):
25462548

25472549

25482550
if __name__ == '__main__':
2551+
os.environ['PYTHONREGRTEST_UNICODE_GUARD'] = 'some_value' # for test_unicode_guard_env
25492552
unittest.main()

0 commit comments

Comments
 (0)