Skip to content

Fixing path comparisons in config tests on Windows #9995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tools/test/config/config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import json
import pytest
from mock import patch
from os.path import join, isfile, dirname, abspath
from os.path import join, isfile, dirname, abspath, normpath
from tools.build_api import get_config
from tools.targets import set_targets_json_location
from tools.config import (
Expand Down Expand Up @@ -93,15 +93,16 @@ def test_config(name):
assert sorted(expected_features) == sorted(features)

included_source = [
join(test_dir, src) for src in
normpath(join(test_dir, src)) for src in
expected.get("included_source", [])
]
excluded_source = [
join(test_dir, src) for src in
normpath(join(test_dir, src)) for src in
expected.get("excluded_source", [])
]
for typ in Resources.ALL_FILE_TYPES:
for _, path in resources.get_file_refs(typ):
path = normpath(path)
if included_source and path in included_source:
included_source.remove(path)
if excluded_source:
Expand Down