Skip to content

Commit 67bc455

Browse files
committed
fix path completer tests
1 parent 1b2256f commit 67bc455

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

django_typer/completers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ def exists(pth: Path) -> bool:
501501
separator = "\\"
502502

503503
completions = []
504-
incomplete_path = Path(incomplete)
504+
incomplete_path = Path(incomplete.replace(separator, os.path.sep))
505505
partial_dir = ""
506506
if not exists(incomplete_path) and not incomplete.endswith(separator):
507507
partial_dir = incomplete_path.name

tests/test_parser_completers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,7 @@ def test_pythonpath_completer(self):
13901390
"--shell",
13911391
SHELL,
13921392
"complete",
1393-
f"multi --pythonpath {incomplete}",
1393+
f"multi --pythonpath '{incomplete}'",
13941394
)[0]
13951395
for pth in local_dirs:
13961396
self.assertIn(f".{sep}{pth}", result)

0 commit comments

Comments
 (0)