diff --git a/Lib/test/test_readline.py b/Lib/test/test_readline.py index b0b9d64cfe6a5f..97ca93ae09db34 100644 --- a/Lib/test/test_readline.py +++ b/Lib/test/test_readline.py @@ -5,6 +5,7 @@ import locale import os import sys +import sysconfig import tempfile import textwrap import threading @@ -413,6 +414,8 @@ def test_write_read_limited_history(self): # So, we've only tested that the read did not fail. # See TestHistoryManipulation for the full test. + @unittest.skipUnless(sysconfig.get_config_var("HAVE_RL_CHANGE_ENVIRONMENT"), + "readline can modify the environment") def test_environment_is_not_modified(self): # os.environ contains environment at the time "os" module was loaded, so # before the "readline" module is loaded.