99HAS_GNU_READLINE = "GNU readline" in readline_doc
1010
1111
12+ @pytest .mark .xfail (reason = "flaky" )
1213def test_integration (testdir , readline_param ):
1314 tmpdir = testdir .tmpdir
1415
@@ -22,27 +23,27 @@ def test_integration(testdir, readline_param):
2223 """ )
2324 )
2425
25- if readline_param != "pyrepl" :
26+ if "pyrepl" not in readline_param :
2627 # Create empty pyrepl module to ignore any installed pyrepl.
2728 mocked_pyrepl = tmpdir .ensure ("pyrepl.py" )
2829 mocked_pyrepl .write ("" )
2930
3031 child = testdir .spawn (f"{ sys .executable } test_file.py" , expect_timeout = 1 )
3132 child .expect_exact ("\n (Pdb++) " )
3233
33- if readline_param != "pyrepl" :
34+ if "pyrepl" not in readline_param :
3435 # Remove it after startup to not interfere with completions.
3536 mocked_pyrepl .remove ()
3637
37- if readline_param == "pyrepl" :
38+ if "pyrepl" in readline_param :
3839 child .expect_exact ("\x1b [?12l\x1b [?25h" )
3940 pdbpp_prompt = "\n (Pdb++) \x1b [?12l\x1b [?25h"
4041 else :
4142 pdbpp_prompt = "\n (Pdb++) "
4243
4344 # Completes help as unique (coming from pdb and fancycompleter).
4445 child .send (b"hel\t " )
45- if readline_param == "pyrepl" :
46+ if "pyrepl" in readline_param :
4647 child .expect_exact (b"\x1b [1@h\x1b [1@e\x1b [1@l\x1b [1@p" )
4748 else :
4849 if not HAS_GNU_READLINE :
@@ -61,13 +62,13 @@ def test_integration(testdir, readline_param):
6162 # Completes breakpoints via pdb, should not contain "\t" from
6263 # fancycompleter.
6364 child .send (b"b \t " )
64- if readline_param == "pyrepl" :
65+ if "pyrepl" in readline_param :
6566 child .expect_exact (b"\x1b [1@b\x1b [1@ \x1b [?25ltest_file.py:\x1b [?12l\x1b [?25h" )
6667 else :
6768 child .expect_exact (b"b test_file.py:" )
6869
6970 child .sendline ("" )
70- if readline_param == "pyrepl" :
71+ if "pyrepl" in readline_param :
7172 child .expect_exact (
7273 b"\x1b [23D\r \n \r \x1b [?1l\x1b >*** Bad lineno: \r \n "
7374 b"\x1b [?1h\x1b =\x1b [?25l\x1b [1A\r \n (Pdb++) \x1b [?12l\x1b [?25h"
@@ -78,7 +79,7 @@ def test_integration(testdir, readline_param):
7879 child .sendline ("c" )
7980 rest = child .read ()
8081
81- if readline_param == "pyrepl" :
82+ if "pyrepl" in readline_param :
8283 expected = b"\x1b [1@c\x1b [9D\r \n \r \x1b [?1l\x1b >"
8384 else :
8485 expected = b"c\r \n "
0 commit comments