white_check_mark: Add coverage instructions to tests (#72)
* ✅ Add coverage instructions to tests * 📝 Update docs note about coverage in features * 🎨 Fix format * 🎨 Update testing docs format
This commit is contained in:
parent
0830c023b9
commit
a89fc4ebb7
4 changed files with 6 additions and 10 deletions
|
@ -78,12 +78,8 @@ The resulting CLI apps created with **Typer** have the nice features of many "pr
|
|||
|
||||
But you can write simpler code with the benefits of modern Python.
|
||||
|
||||
<!--
|
||||
|
||||
TODO
|
||||
|
||||
### Tested
|
||||
## Tested
|
||||
|
||||
* 100% <abbr title="The amount of code that is automatically tested">test coverage</abbr>.
|
||||
* 100% <abbr title="Python type annotations, with this your editor and external tools can give you better support">type annotated</abbr> code base.
|
||||
* Used in production applications. -->
|
||||
* Used in production applications.
|
||||
|
|
|
@ -92,7 +92,7 @@ collected 1 item
|
|||
|
||||
---> 100%
|
||||
|
||||
test_main.py <span style="color: green;">. [100%]</span>
|
||||
test_main.py <span style="color: green; white-space: pre;">. [100%]</span>
|
||||
|
||||
<span style="color: green;">================= 1 passed in 0.03s =================</span>
|
||||
```
|
||||
|
|
|
@ -24,7 +24,7 @@ def test_show_completion():
|
|||
def test_install_completion():
|
||||
bash_completion_path: Path = Path.home() / ".bash_completion"
|
||||
text = ""
|
||||
if bash_completion_path.is_file():
|
||||
if bash_completion_path.is_file(): # pragma: nocover
|
||||
text = bash_completion_path.read_text()
|
||||
result = subprocess.run(
|
||||
[
|
||||
|
|
|
@ -83,7 +83,7 @@ def test_completion_install_fish():
|
|||
script_path = Path(mod.__file__)
|
||||
completion_path: Path = Path.home() / f".config/fish/completions/{script_path.name}.fish"
|
||||
text = ""
|
||||
if completion_path.is_file():
|
||||
if completion_path.is_file(): # pragma: nocover
|
||||
text = completion_path.read_text()
|
||||
result = subprocess.run(
|
||||
["coverage", "run", mod.__file__, "--install-completion", "fish"],
|
||||
|
@ -114,7 +114,7 @@ def test_completion_install_powershell():
|
|||
completion_path: Path = Path.home() / f".config/powershell/Microsoft.PowerShell_profile.ps1"
|
||||
completion_path_bytes = f"{completion_path}\n".encode("windows-1252")
|
||||
text = ""
|
||||
if completion_path.is_file():
|
||||
if completion_path.is_file(): # pragma: nocover
|
||||
text = completion_path.read_text()
|
||||
|
||||
with mock.patch.object(
|
||||
|
|
Loading…
Reference in a new issue