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 775ae4a commit 8bbc1cfCopy full SHA for 8bbc1cf
1 file changed
Lib/test/test_readline.py
@@ -405,6 +405,15 @@ def test_write_read_limited_history(self):
405
# So, we've only tested that the read did not fail.
406
# See TestHistoryManipulation for the full test.
407
408
+ def test_environment_is_not_modified(self):
409
+ # os.environ contains enviroment at the time "os" module was loaded, so
410
+ # before the "readline" module is loaded.
411
+ original_env = dict(os.environ)
412
+
413
+ # Force refresh of os.environ and make sure it is the same as before the
414
+ # refresh.
415
+ os.reload_environ()
416
+ self.assertEqual(dict(os.environ), original_env)
417
418
@unittest.skipUnless(support.Py_GIL_DISABLED, 'these tests can only possibly fail with GIL disabled')
419
class FreeThreadingTest(unittest.TestCase):
0 commit comments