mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 06:00:51 +00:00
Merge pull request #7362 from sboddy/fix_7348_ci_test_normalize_path
This commit is contained in:
@@ -23,6 +23,7 @@ import bonsai.core.tool
|
|||||||
import bonsai.tool as tool
|
import bonsai.tool as tool
|
||||||
import pytest
|
import pytest
|
||||||
import tempfile
|
import tempfile
|
||||||
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from bonsai.tool.ifc import Ifc as subject
|
from bonsai.tool.ifc import Ifc as subject
|
||||||
|
|
||||||
@@ -318,8 +319,10 @@ class TestUri(test.bim.bootstrap.NewFile):
|
|||||||
|
|
||||||
def test_normalize_path(self):
|
def test_normalize_path(self):
|
||||||
# Posix format.
|
# Posix format.
|
||||||
path = r"test\test.txt"
|
if os.name == "nt":
|
||||||
assert subject.normalize_path(path) == "test/test.txt"
|
# Limit to windows (#7348)
|
||||||
|
path = r"test\test.txt"
|
||||||
|
assert subject.normalize_path(path) == "test/test.txt"
|
||||||
|
|
||||||
with tempfile.TemporaryDirectory() as tmp_dir:
|
with tempfile.TemporaryDirectory() as tmp_dir:
|
||||||
base_path = Path(tmp_dir)
|
base_path = Path(tmp_dir)
|
||||||
|
|||||||
Reference in New Issue
Block a user