Skip to content

Commit 11fd714

Browse files
author
Tal Hadad
committed
fix integration test for windows
1 parent af84e45 commit 11fd714

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

integration_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## test with python -m pytest integration_test.py
22

33
import os
4+
import pathlib
45
import pytest
56
from testutils import simplecpp, format_include_path_arg, format_include
67

@@ -62,7 +63,7 @@ def test_relative_header_2(tmpdir, inv, source_relative):
6263
if source_relative and not inv:
6364
assert '#line 8 "test.h"' in stdout
6465
else:
65-
assert f'#line 8 "{tmpdir}/test.h"' in stdout
66+
assert f'#line 8 "{pathlib.PosixPath(tmpdir)}/test.h"' in stdout
6667

6768
@pytest.mark.parametrize("is_sys", (False, True))
6869
@pytest.mark.parametrize("inv", (False, True))
@@ -85,7 +86,7 @@ def test_relative_header_3(tmpdir, is_sys, inv, source_relative):
8586
if source_relative and not inv:
8687
assert '#line 8 "test_subdir/test.h"' in stdout
8788
else:
88-
assert f'#line 8 "{test_subdir}/test.h"' in stdout
89+
assert f'#line 8 "{pathlib.PosixPath(test_subdir)}/test.h"' in stdout
8990

9091
@pytest.mark.parametrize("use_short_path", (False, True))
9192
@pytest.mark.parametrize("is_sys", (False, True))

0 commit comments

Comments
 (0)