Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✅ Generalize test suite to run on Windows #810

Merged
merged 3 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/test_completion/test_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def test_show_completion():
[
"bash",
"-c",
f"{sys.executable} -m coverage run {mod.__file__} --show-completion",
f"'{sys.executable}' -m coverage run '{mod.__file__}' --show-completion",
],
capture_output=True,
encoding="utf-8",
Expand All @@ -29,7 +29,7 @@ def test_install_completion():
[
"bash",
"-c",
f"{sys.executable} -m coverage run {mod.__file__} --install-completion",
f"'{sys.executable}' -m coverage run '{mod.__file__}' --install-completion",
],
capture_output=True,
encoding="utf-8",
Expand All @@ -38,7 +38,7 @@ def test_install_completion():
new_text = bash_completion_path.read_text()
bash_completion_path.write_text(text)
assert "source" in new_text
assert ".bash_completions/tutorial001.py.sh" in new_text
assert str(Path(".bash_completions/tutorial001.py.sh")) in new_text
assert "completion installed in" in result.stdout
assert "Completion will take effect once you restart the terminal" in result.stdout

Expand Down
6 changes: 3 additions & 3 deletions tests/test_completion/test_completion_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def test_completion_install_bash():
)
new_text = bash_completion_path.read_text()
bash_completion_path.write_text(text)
install_source = ".bash_completions/tutorial001.py.sh"
assert install_source not in text
assert install_source in new_text
install_source = Path(".bash_completions/tutorial001.py.sh")
assert str(install_source) not in text
assert str(install_source) in new_text
assert "completion installed in" in result.stdout
assert "Completion will take effect once you restart the terminal" in result.stdout
install_source_path = Path.home() / install_source
Expand Down