Skip to content

Commit 382f9b2

Browse files
SnoopJpfmoore
andcommitted
Simplify test of expected error message
Co-authored-by: Paul Moore <[email protected]>
1 parent d534187 commit 382f9b2

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

tests/functional/test_install_script.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,7 @@ def test_script_file_python_version(script: PipTestEnvironment) -> None:
9090
expect_error=True,
9191
)
9292

93-
if sys.platform == "win32":
94-
# Special case: result.stderr contains an extra layer of backslash
95-
# escaping, transform our path to match
96-
script_path_str = str(script_path).replace("\\", "\\\\")
97-
else:
98-
script_path_str = str(script_path)
99-
100-
assert (
101-
f"ERROR: Script '{script_path_str}' requires a different Python"
102-
in result.stderr
103-
), (
93+
assert "requires a different Python" in result.stderr, (
10494
"Script with incompatible requires-python did not fail as expected -- "
10595
+ result.stderr
10696
)

0 commit comments

Comments
 (0)