Skip to content

Commit

Permalink
tests: fix windows
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Feb 6, 2024
1 parent df10247 commit 1ba961b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/tests_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
from pathlib import Path
from pymake import main, PymakeKeyError, PymakeTypeError

fname = str(Path(__file__).parent.parent.resolve() / "examples" / "Makefile")
fname = Path(__file__).parent.parent.resolve() / 'examples' / 'Makefile'
fname = str(fname).replace("\\", "\\\\")


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

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

# actual test:
Expand Down

0 comments on commit 1ba961b

Please sign in to comment.