mirror of
https://github.com/SeedSigner/seedsigner.git
synced 2026-10-05 23:18:25 +00:00
Adds coverage convenience script
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ omit = [
|
||||
"*/tests/*",
|
||||
"*/pyzbar/*",
|
||||
]
|
||||
skip_covered = true
|
||||
skip_covered = false
|
||||
skip_empty = true
|
||||
|
||||
[tool.coverage.run]
|
||||
|
||||
+10
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
The tests are designed to be run on non-Raspi hardware.
|
||||
|
||||
## Setup
|
||||
On your testing machine you'll have to install:
|
||||
```bash
|
||||
# general dependencies
|
||||
@@ -16,6 +17,14 @@ Then make the `seedsigner` python module visible/importable to the tests by inst
|
||||
pip3 install -e .
|
||||
```
|
||||
|
||||
## Running all tests, calculating overall test coverage
|
||||
tldr: just run the convenience script from the project root:
|
||||
|
||||
```bash
|
||||
./tests/run_full_coverage.sh
|
||||
```
|
||||
|
||||
## Running tests manually
|
||||
Run the whole test suite:
|
||||
```
|
||||
pytest
|
||||
@@ -52,7 +61,7 @@ it is actually implemented to be run by `pytest`.
|
||||
see: [Screenshot generator README](screenshot_generator/README.md)
|
||||
|
||||
|
||||
## Test Coverage
|
||||
## Generate coverage manually
|
||||
Run tests and generate test coverage
|
||||
```bash
|
||||
coverage run -m pytest
|
||||
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Run the full test suite
|
||||
coverage run -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
|
||||
|
||||
# Combine the above coverage results; also cleans up any prior .coverage.* results files
|
||||
coverage combine
|
||||
|
||||
# Show the cli report
|
||||
coverage report
|
||||
|
||||
# Generate the interactive html report
|
||||
coverage html
|
||||
Reference in New Issue
Block a user