Skip to content

Commit 0e4940f

Browse files
gh-154395: Skip test_environment_is_not_modified without rl_change_environment (GH-154396)
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>
1 parent f1730dd commit 0e4940f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/test/test_readline.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import locale
66
import os
77
import sys
8+
import sysconfig
89
import tempfile
910
import textwrap
1011
import threading
@@ -413,6 +414,8 @@ def test_write_read_limited_history(self):
413414
# So, we've only tested that the read did not fail.
414415
# See TestHistoryManipulation for the full test.
415416

417+
@unittest.skipUnless(sysconfig.get_config_var("HAVE_RL_CHANGE_ENVIRONMENT"),
418+
"readline can modify the environment")
416419
def test_environment_is_not_modified(self):
417420
# os.environ contains environment at the time "os" module was loaded, so
418421
# before the "readline" module is loaded.

0 commit comments

Comments
 (0)