Skip to content

Commit bd23717

Browse files
committed
Fix tests on Windows
1 parent 9ce7f6f commit bd23717

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_plugin.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# stdlib
2+
import os
23
from io import StringIO
34

45
# 3rd party
@@ -30,4 +31,6 @@ def test_plugin(tmp_pathplus: PathPlus, file_regression: FileRegressionFixture):
3031
cov.report(morfs=[tests.demo_code.__file__], file=output)
3132
cov.erase()
3233

33-
check_file_regression(output.getvalue().replace(tests.demo_code.__file__, "demo_code.py"), file_regression)
34+
buf = output.getvalue().replace(tests.demo_code.__file__, "demo_code.py")
35+
buf = buf.replace(os.path.altsep or os.path.sep, os.path.sep)
36+
check_file_regression(buf, file_regression)

0 commit comments

Comments
 (0)