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:
Sebastián Ramírez 2020-03-19 14:44:43 +01:00 committed by GitHub
parent 0830c023b9
commit a89fc4ebb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 10 deletions

View file

@ -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.

View file

@ -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>
```

View file

@ -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(
[

View file

@ -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(