Skip to content

Commit 492d08f

Browse files
Cruz Monrreal IICruz Monrreal II
authored andcommitted
Merge pull request ARMmbed#9995 from bridadan/fix_config_tests_on_windows
Fixing path comparisons in config tests on Windows
2 parents e32ee67 + 51c1bd3 commit 492d08f

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
@@ -19,7 +19,7 @@
1919
import json
2020
import pytest
2121
from mock import patch
22-
from os.path import join, isfile, dirname, abspath
22+
from os.path import join, isfile, dirname, abspath, normpath
2323
from tools.build_api import get_config
2424
from tools.targets import set_targets_json_location
2525
from tools.config import (
@@ -93,15 +93,16 @@ def test_config(name):
9393
assert sorted(expected_features) == sorted(features)
9494

9595
included_source = [
96-
join(test_dir, src) for src in
96+
normpath(join(test_dir, src)) for src in
9797
expected.get("included_source", [])
9898
]
9999
excluded_source = [
100-
join(test_dir, src) for src in
100+
normpath(join(test_dir, src)) for src in
101101
expected.get("excluded_source", [])
102102
]
103103
for typ in Resources.ALL_FILE_TYPES:
104104
for _, path in resources.get_file_refs(typ):
105+
path = normpath(path)
105106
if included_source and path in included_source:
106107
included_source.remove(path)
107108
if excluded_source:

0 commit comments

Comments
 (0)