Merge pull request #9995 from bridadan/fix_config_tests_on_windows

Fixing path comparisons in config tests on Windows
pull/10267/head
Cruz Monrreal 2019-03-28 17:05:43 -05:00 committed by GitHub
commit 775a91d172
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -19,7 +19,7 @@ import os
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 (
@ -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: