Skip to content

Commit 5f0376c

Browse files
committed
expand terminal width to fix prompt install tests
1 parent 47969d3 commit 5f0376c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/shellcompletion/__init__.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,13 @@ def test_prompt_install(self, env={}, directory: t.Optional[Path] = None):
504504

505505
rex = re.compile
506506
expected = [
507-
rex(r"Append\s+the\s+above\s+contents\s+to\s+(?P<file>.*)\?"), # 0
508-
rex(r"Create\s+(?P<file>.*)\s+with\s+the\s+above\s+contents\?"), # 1
507+
rex(
508+
r"Append\s+the\s+above\s+contents\s+to\s+(?P<file>.*)\?", re.DOTALL
509+
), # 0
510+
rex(
511+
r"Create\s+(?P<file>.*)\s+with\s+the\s+above\s+contents\?",
512+
re.DOTALL,
513+
), # 1
509514
rex(r"Aborted\s+shell\s+completion\s+installation."), # 2
510515
rex(rf"Installed\s+autocompletion\s+for\s+{self.shell}"), # 3
511516
]
@@ -521,6 +526,7 @@ def test_prompt_install(self, env={}, directory: t.Optional[Path] = None):
521526
self.verify_remove(directory=directory)
522527

523528
install = pexpect.spawn(self.manage_script, install_command, env=env)
529+
install.setwinsize(24, 800)
524530

525531
def wait_for_output(child) -> t.Tuple[int, t.Optional[str]]:
526532
index = child.expect(expected)
@@ -545,6 +551,7 @@ def wait_for_output(child) -> t.Tuple[int, t.Optional[str]]:
545551

546552
# test an install
547553
install = pexpect.spawn(self.manage_script, install_command, env=env)
554+
install.setwinsize(24, 800)
548555

549556
while True:
550557
idx, _ = wait_for_output(install)

0 commit comments

Comments
 (0)