Skip to content

Commit a84fd31

Browse files
committed
Update tests
1 parent f434264 commit a84fd31

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

‎python_files/tests/test_shell_integration.py‎

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
import pythonrc
99

1010
is_wsl = "microsoft-standard-WSL" in platform.release()
11-
prompt_is_installed = not is_wsl and (
12-
sys.platform != "win32" or sys.version_info >= (3, 13)
13-
)
11+
prompt_is_installed = not is_wsl and (sys.platform != "win32" or sys.version_info >= (3, 13))
1412

1513
PYTHONRC_PATH = Path(pythonrc.__file__)
1614

@@ -25,10 +23,7 @@ class _PS1(Protocol):
2523

2624
def _expected_prompt(exit_code: int) -> str:
2725
if sys.platform == "win32":
28-
return (
29-
f"\x1b]633;D;{exit_code}\x07\x1b]633;A\x07>>> "
30-
"\x1b]633;B\x07\x1b]633;C\x07"
31-
)
26+
return f"\x1b]633;D;{exit_code}\x07\x1b]633;A\x07>>> \x1b]633;B\x07\x1b]633;C\x07"
3227
return (
3328
"\x01\x1b]633;C\x07\x1b]633;E;None\x07"
3429
f"\x1b]633;D;{exit_code}\x07\x1b]633;A\x07\x02>>> \x01\x1b]633;B\x07\x02"
@@ -93,9 +88,7 @@ def test_replacement_regex_removes_bel_terminated_osc():
9388
pyrepl_utils = importlib.import_module("_pyrepl.utils")
9489
importlib.reload(pythonrc)
9590

96-
assert pyrepl_utils.ANSI_ESCAPE_SEQUENCE.sub("", "before\x1b]633;A\x07after") == (
97-
"beforeafter"
98-
)
91+
assert pyrepl_utils.ANSI_ESCAPE_SEQUENCE.sub("", "before\x1b]633;A\x07after") == ("beforeafter")
9992

10093

10194
def test_replacement_regex_removes_st_terminated_osc():

0 commit comments

Comments
 (0)