Skip to content

Commit 19aaf75

Browse files
committed
fix failing test
1 parent e88abcf commit 19aaf75

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/test_import_hook/test_utilities.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,20 @@
2929
log = logging.getLogger(__name__)
3030

3131

32+
@pytest.mark.skipif(os.linesep != "\n", reason="hashes calculated with \\n line endings")
3233
def test_maturin_unchanged() -> None:
3334
"""if new options have been added to maturin then the import hook needs to be updated to match"""
3435
env = {"PATH": os.environ["PATH"], "COLUMNS": "120"}
3536

3637
build_help = subprocess.check_output("stty rows 50 cols 120; maturin build --help", shell=True, env=env) # noqa: S602
37-
assert hashlib.sha1(build_help).hexdigest() == "ea47a884c90c9376047687aed98ab1dca29b433a"
38+
assert hashlib.sha1(build_help).hexdigest() == "ea47a884c90c9376047687aed98ab1dca29b433a", (
39+
f"hashes don't match. build_help = {build_help!r}"
40+
)
3841

3942
develop_help = subprocess.check_output("stty rows 50 cols 120; maturin develop --help", shell=True, env=env) # noqa: S602
40-
assert hashlib.sha1(develop_help).hexdigest() == "ad7036a829c6801224933d589b1f9848678c9458"
43+
assert hashlib.sha1(develop_help).hexdigest() == "ad7036a829c6801224933d589b1f9848678c9458", (
44+
f"hashes don't match. develop_help = {develop_help!r}"
45+
)
4146

4247

4348
def test_settings() -> None:

0 commit comments

Comments
 (0)