Skip to content

Commit

Permalink
docs/contributing.md: Example for running limited unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bauen1 committed Oct 31, 2024
1 parent c2d5212 commit b3d637b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ scripts/dev-test.sh

Use `pytest` to run the unit tests, or `pytest --cov` to run with coverage. Pull requests are expected to be tested and not drop overall project coverage by >1%.

To limit the pytests to a specific fact or operation:

```sh
# Only run fact tests for facts.efibootmgr.EFIBootMGR
pytest tests/test_facts.py -k "efibootmgr.EFIBootMGR"

# Only run operation tests for operations.selinux
pytest tests/test_operations.py -k "selinux."
```

#### End to End Tests

The end to end tests are also executed via `pytest` but not selected by default, options/usage:
Expand Down

0 comments on commit b3d637b

Please sign in to comment.