Skip to content

Commit

Permalink
fix path completer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bckohan committed Jan 1, 2025
1 parent 1b2256f commit 67bc455
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion django_typer/completers.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def exists(pth: Path) -> bool:
separator = "\\"

completions = []
incomplete_path = Path(incomplete)
incomplete_path = Path(incomplete.replace(separator, os.path.sep))
partial_dir = ""
if not exists(incomplete_path) and not incomplete.endswith(separator):
partial_dir = incomplete_path.name
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parser_completers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@ def test_pythonpath_completer(self):
"--shell",
SHELL,
"complete",
f"multi --pythonpath {incomplete}",
f"multi --pythonpath '{incomplete}'",
)[0]
for pth in local_dirs:
self.assertIn(f".{sep}{pth}", result)
Expand Down

0 comments on commit 67bc455

Please sign in to comment.