Skip to content
Myr

white_check_mark: Add coverage instructions to tests (#72)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* :white_check_mark: Add coverage instructions to tests * :memo: Update docs note about coverage in features * :art: Fix format * :art: Update testing docs format

authored by Sebastián Ramírez · committed by GitHub · parent 0830c02 · Browse files · 4 files+6 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+6 added−10 removed

  • tests:+3 added−3 removed
  • other:+3 added−7 removed

4 files+6 added−10 removed

modified:docs/tutorial/testing.md+1 added-1 removed
90 unmodified lines
91collected 1 item9293---> 100%9495test_main.py <span style="color: green;">. [100%]</span>95test_main.py <span style="color: green; white-space: pre;">. [100%]</span>9697<span style="color: green;">================= 1 passed in 0.03s =================</span>98```99
114 unmodified lines
modified:docs/features.md+2 added-6 removed
modified:tests/test_completion/test_completion_install.py+2 added-2 removed
81 unmodified lines
82def test_completion_install_fish():83 script_path = Path(mod.__file__)84 completion_path: Path = Path.home() / f".config/fish/completions/{script_path.name}.fish"85 text = ""86 if completion_path.is_file():86 if completion_path.is_file(): # pragma: nocover87 text = completion_path.read_text()88 result = subprocess.run(89 ["coverage", "run", mod.__file__, "--install-completion", "fish"],90 stdout=subprocess.PIPE,
22 unmodified lines
113def test_completion_install_powershell():114 completion_path: Path = Path.home() / f".config/powershell/Microsoft.PowerShell_profile.ps1"115 completion_path_bytes = f"{completion_path}\n".encode("windows-1252")116 text = ""117 if completion_path.is_file():117 if completion_path.is_file(): # pragma: nocover118 text = completion_path.read_text()119120 with mock.patch.object(121 shellingham, "detect_shell", return_value=("pwsh", "/usr/bin/pwsh")
19 unmodified lines
modified:tests/test_completion/test_completion.py+1 added-1 removed
22 unmodified lines
2324def test_install_completion():25 bash_completion_path: Path = Path.home() / ".bash_completion"26 text = ""27 if bash_completion_path.is_file():27 if bash_completion_path.is_file(): # pragma: nocover28 text = bash_completion_path.read_text()29 result = subprocess.run(30 [31 "bash",
143 unmodified lines