Skip to content

Commit 155deba

Browse files
committed
tests: fix windows
1 parent 4ee6d02 commit 155deba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/tests_main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
from pathlib import Path
44
from pymake import main, PymakeKeyError, PymakeTypeError
55

6-
fname = str(Path(__file__).parent.parent.resolve() / "examples" / "Makefile")
6+
fname = Path(__file__).parent.parent.resolve() / 'examples' / 'Makefile'
7+
fname = str(fname).replace("\\", "\\\\")
78

89

910
def _sh(*cmd, **kwargs):
@@ -13,8 +14,7 @@ def _sh(*cmd, **kwargs):
1314

1415
def test_main():
1516
"""Test execution"""
16-
res = _sh(sys.executable, '-c', ('\
17-
import pymake; pymake.main(["-f", "%s"])' % fname).strip(),
17+
res = _sh(sys.executable, '-c', f'import pymake; pymake.main(["-f", "{fname}"])',
1818
stderr=subprocess.STDOUT)
1919

2020
# actual test:

0 commit comments

Comments
 (0)