Skip to content

Commit

Permalink
Use normpath in tests for Windows backslashes
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Oct 24, 2022
1 parent b475706 commit 04784da
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions test/test_configoptions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from pathlib import Path
from pprint import pprint

Expand Down Expand Up @@ -596,7 +597,7 @@ def test_real_config_inherit_cross_cmake():
"cmake": {
"build_type": "Release",
"generator": "Ninja",
"source_path": "/project/src",
"source_path": os.path.normpath("/project/src"),
"args": ["arg1", "arg2"],
"env": {
"foo": "bar"
Expand All @@ -611,7 +612,7 @@ def test_real_config_inherit_cross_cmake():
"cmake": {
"build_type": "RelWithDebInfo",
"generator": "Unix Makefiles",
"source_path": "/project/src",
"source_path": os.path.normpath("/project/src"),
"args": ["arg1", "arg2", "arg3", "arg4"],
"env": {
"foo": "bar",
Expand All @@ -623,7 +624,7 @@ def test_real_config_inherit_cross_cmake():
"cmake": {
"build_type": "Release",
"generator": "Ninja",
"source_path": "/project/src",
"source_path": os.path.normpath("/project/src"),
"args": ["arg1", "arg2"],
"env": {
"foo": "bar"
Expand All @@ -635,7 +636,7 @@ def test_real_config_inherit_cross_cmake():
"cmake": {
"build_type": "Release",
"generator": "Ninja",
"source_path": "/project/src",
"source_path": os.path.normpath("/project/src"),
"args": ["arg1", "arg2"],
"env": {
"foo": "bar"
Expand All @@ -647,7 +648,7 @@ def test_real_config_inherit_cross_cmake():
"cmake": {
"build_type": "Release",
"generator": "Ninja",
"source_path": "/project/src",
"source_path": os.path.normpath("/project/src"),
"args": ["arg1", "arg2"],
"env": {
"foo": "bar"
Expand All @@ -671,7 +672,7 @@ def test_real_config_inherit_cross_cmake():
"py-build-cmake": {
"module": {
"name": "foobar",
"directory": "/project",
"directory": os.path.normpath("/project"),
},
"sdist": {
"include": [],
Expand All @@ -681,7 +682,7 @@ def test_real_config_inherit_cross_cmake():
"build_type": "Release",
"config": ["Release"],
"generator": "Ninja",
"source_path": "/project/src",
"source_path": os.path.normpath("/project/src"),
"build_path": ".py-build-cmake_cache",
"options": {},
"args": ["arg1", "arg2"],
Expand All @@ -707,7 +708,7 @@ def test_real_config_inherit_cross_cmake():
"build_type": "RelWithDebInfo",
"config": ["RelWithDebInfo"],
"generator": "Unix Makefiles",
"source_path": "/project/src",
"source_path": os.path.normpath("/project/src"),
"build_path": ".py-build-cmake_cache",
"options": {},
"args": ["arg1", "arg2", "arg3", "arg4"],
Expand All @@ -730,7 +731,7 @@ def test_real_config_inherit_cross_cmake():
"build_type": "Release",
"config": ["Release"],
"generator": "Ninja",
"source_path": "/project/src",
"source_path": os.path.normpath("/project/src"),
"build_path": ".py-build-cmake_cache",
"options": {},
"args": ["arg1", "arg2"],
Expand All @@ -752,7 +753,7 @@ def test_real_config_inherit_cross_cmake():
"build_type": "Release",
"config": ["Release"],
"generator": "Ninja",
"source_path": "/project/src",
"source_path": os.path.normpath("/project/src"),
"build_path": ".py-build-cmake_cache",
"options": {},
"args": ["arg1", "arg2"],
Expand All @@ -774,7 +775,7 @@ def test_real_config_inherit_cross_cmake():
"build_type": "Release",
"config": ["Release"],
"generator": "Ninja",
"source_path": "/project/src",
"source_path": os.path.normpath("/project/src"),
"build_path": ".py-build-cmake_cache",
"options": {},
"args": ["arg1", "arg2"],
Expand Down Expand Up @@ -842,7 +843,7 @@ def test_real_config_no_cross():
"py-build-cmake": {
"module": {
"name": "foobar",
"directory": "/project",
"directory": os.path.normpath("/project"),
},
"sdist": {
"include": [],
Expand All @@ -852,7 +853,7 @@ def test_real_config_no_cross():
"build_type": "Release",
"config": ["Release"],
"generator": "Ninja",
"source_path": "/project/src",
"source_path": os.path.normpath("/project/src"),
"build_path": ".py-build-cmake_cache",
"options": {},
"args": ["arg1", "arg2"],
Expand All @@ -873,7 +874,7 @@ def test_real_config_no_cross():
"build_type": "Release",
"config": ["Release"],
"generator": "Ninja",
"source_path": "/project/src",
"source_path": os.path.normpath("/project/src"),
"build_path": ".py-build-cmake_cache",
"options": {},
"args": ["arg1", "arg2"],
Expand All @@ -895,7 +896,7 @@ def test_real_config_no_cross():
"build_type": "Release",
"config": ["Release"],
"generator": "Ninja",
"source_path": "/project/src",
"source_path": os.path.normpath("/project/src"),
"build_path": ".py-build-cmake_cache",
"options": {},
"args": ["arg1", "arg2"],
Expand All @@ -917,7 +918,7 @@ def test_real_config_no_cross():
"build_type": "Release",
"config": ["Release"],
"generator": "Ninja",
"source_path": "/project/src",
"source_path": os.path.normpath("/project/src"),
"build_path": ".py-build-cmake_cache",
"options": {},
"args": ["arg1", "arg2"],
Expand Down Expand Up @@ -965,7 +966,7 @@ def test_real_config_no_cmake():
"py-build-cmake": {
"module": {
"name": "foobar",
"directory": "/project",
"directory": os.path.normpath("/project"),
},
"sdist": {
"include": [],
Expand Down Expand Up @@ -1030,7 +1031,7 @@ def test_real_config_local_override():
"py-build-cmake": {
"module": {
"name": "foobar",
"directory": "/project",
"directory": os.path.normpath("/project"),
},
"sdist": {
"include": ["somefile*"],
Expand Down Expand Up @@ -1104,7 +1105,7 @@ def test_real_config_local_override_windows():
"py-build-cmake": {
"module": {
"name": "foobar",
"directory": "/project",
"directory": os.path.normpath("/project"),
},
"sdist": {
"include": [],
Expand Down

0 comments on commit 04784da

Please sign in to comment.