Skip to content

Commit 22ef1db

Browse files
committed
exempt powershell from rich output shell complete tests because it overrides the ansi codes anyway
1 parent a093e4e commit 22ef1db

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

tests/shellcompletion/__init__.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -291,18 +291,10 @@ def run_rich_option_completion(self, rich_output_expected: bool):
291291
elif rich_output_expected:
292292
# \x1b[0m and \x1b[m are the same
293293
if self.shell not in ["powershell", "pwsh"]:
294+
# exempt powershell from this because it filters the codes anyway
294295
self.assertIn("\x1b[7mcommands\x1b[", completions)
295296
self.assertIn("\x1b[4;33mcommands\x1b[", completions)
296297
self.assertIn("\x1b[1mname\x1b[", completions)
297-
else:
298-
# on powershell the helps cycle through when you tab - so only one is listed
299-
self.assertTrue(
300-
"\x1b[1mimport path\x1b[" in completions
301-
or "\x1b[7mcommands\x1b[" in completions
302-
or "\x1b[4;33mcommands\x1b[" in completions
303-
or "\x1b[1mname\x1b[" in completions
304-
)
305-
306298
else:
307299
self.assertNotIn("\x1b[7mcommands\x1b[", completions)
308300
self.assertNotIn("\x1b[4;33mcommands\x1b[", completions)

0 commit comments

Comments
 (0)