We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd7a850 commit 4d18a9cCopy full SHA for 4d18a9c
1 file changed
Lib/test/test_readline.py
@@ -431,6 +431,16 @@ def my_hook():
431
readline.set_pre_input_hook(my_hook)
432
self.assertIs(readline.get_pre_input_hook(), my_hook)
433
434
+ def test_environment_is_not_modified(self):
435
+ # os.environ contains enviroment at the time "os" module was loaded, so
436
+ # before the "readline" module is loaded.
437
+ original_env = dict(os.environ)
438
+
439
+ # Force refresh of os.environ and make sure it is the same as before the
440
+ # refresh.
441
+ os.reload_environ()
442
+ self.assertEqual(dict(os.environ), original_env)
443
444
445
@unittest.skipUnless(support.Py_GIL_DISABLED, 'these tests can only possibly fail with GIL disabled')
446
class FreeThreadingTest(unittest.TestCase):
0 commit comments