readline sets LINES and COLUMNS if rl_change_environment is not
available, which is the case with readline older than 6.3.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
import locale
import os
import sys
+import sysconfig
import tempfile
import textwrap
import threading
# 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.