Skip to content

Commit ed2c2f5

Browse files
committed
Fixing path comparisons on Windows
1 parent 277c91f commit ed2c2f5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tools/test/config/config_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from mock import patch
2323
from hypothesis import given
2424
from hypothesis.strategies import sampled_from
25-
from os.path import join, isfile, dirname, abspath
25+
from os.path import join, isfile, dirname, abspath, normpath
2626
from tools.build_api import get_config
2727
from tools.targets import set_targets_json_location, Target, TARGET_NAMES
2828
from tools.config import ConfigException, Config, ConfigParameter, ConfigMacro
@@ -94,15 +94,16 @@ def test_config(name):
9494
assert sorted(expected_features) == sorted(features)
9595

9696
included_source = [
97-
join(test_dir, src) for src in
97+
normpath(join(test_dir, src)) for src in
9898
expected.get("included_source", [])
9999
]
100100
excluded_source = [
101-
join(test_dir, src) for src in
101+
normpath(join(test_dir, src)) for src in
102102
expected.get("excluded_source", [])
103103
]
104104
for typ in Resources.ALL_FILE_TYPES:
105105
for _, path in resources.get_file_refs(typ):
106+
path = normpath(path)
106107
if included_source and path in included_source:
107108
included_source.remove(path)
108109
if excluded_source:

0 commit comments

Comments
 (0)