mirror of
https://github.com/SeedSigner/seedsigner.git
synced 2026-09-14 04:45:08 +00:00
Updated coverage docs, script
This commit is contained in:
@@ -47,8 +47,6 @@ exclude_lines = [
|
||||
omit = [
|
||||
"*/__init__.py",
|
||||
"*/tests/*",
|
||||
"*/hardware/*",
|
||||
"*/pyzbar/*",
|
||||
]
|
||||
skip_covered = false
|
||||
skip_empty = true
|
||||
|
||||
+3
-9
@@ -67,23 +67,17 @@ Run tests and generate test coverage
|
||||
coverage run -m pytest
|
||||
```
|
||||
|
||||
The screenshots have to be run separately, but they can also add to overall coverage:
|
||||
|
||||
The screenshots can generate their own separate coverage report:
|
||||
```bash
|
||||
coverage run -m pytest tests/screenshot_generator/generator.py --locale es
|
||||
```
|
||||
|
||||
Each run creates its own `.coverage.*` results file. Merge them into one result with:
|
||||
```bash
|
||||
coverage combine
|
||||
```
|
||||
|
||||
Show the resulting test coverage details:
|
||||
```bash
|
||||
coverage report
|
||||
```
|
||||
|
||||
Generate the html overview:
|
||||
Generate the interactive html report:
|
||||
```bash
|
||||
coverage html
|
||||
```
|
||||
```
|
||||
@@ -1,15 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Run the full test suite
|
||||
coverage run -m pytest
|
||||
# Clean up any prior coverage results
|
||||
coverage erase
|
||||
|
||||
# Run the full test suite; `--parallel` writes coverage results to a separate file
|
||||
# (otherwise it'll be overwritten in the next step)
|
||||
coverage run --parallel -m pytest
|
||||
|
||||
# Generate screenshots (only need to run for one locale to assess coverage)
|
||||
coverage run -m pytest tests/screenshot_generator/generator.py --locale es
|
||||
coverage run --parallel -m pytest tests/screenshot_generator/generator.py --locale es
|
||||
|
||||
# Combine the above coverage results; also cleans up any prior .coverage.* results files
|
||||
# Combine the above coverage results
|
||||
coverage combine
|
||||
|
||||
# Show the cli report
|
||||
# Show the report in the terminal
|
||||
coverage report
|
||||
|
||||
# Generate the interactive html report
|
||||
|
||||
Reference in New Issue
Block a user