Skip to content

Commit 0a3e854

Browse files
Revert "Try not normalizing the path"
This reverts commit 49f4802.
1 parent 49f4802 commit 0a3e854

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

tests/resources.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@
1616
RESOURCE_PATH = Path(__file__).parent / DATA_DIR / "data"
1717

1818

19-
def find(name: str, normpath: bool = True) -> str:
20-
path = os.path.join(os.path.dirname(__file__), DATA_DIR, name)
21-
if normpath:
22-
return os.path.normpath(path)
23-
return path
19+
def find(name: str) -> str:
20+
return os.path.normpath(os.path.join(os.path.dirname(__file__), DATA_DIR, name))
2421

2522

2623
def build_file(path: str, modname: str | None = None) -> Module:

tests/test_modutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def test_std_lib(self) -> None:
269269
)
270270

271271
def test_std_lib_found_before_same_named_package_on_path(self) -> None:
272-
sys.path.insert(0, resources.find("data", normpath=False))
272+
sys.path.insert(0, resources.find("data"))
273273
self.addCleanup(sys.path.pop, 0)
274274

275275
file = modutils.file_from_modpath(["copy"])

0 commit comments

Comments
 (0)