Skip to content

Commit

Permalink
docs: add basic info regarding tests/linting/formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Strömer committed Jun 11, 2024
1 parent c8442be commit 9e58285
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions docs/pages/dev/testing.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
# Testing
# Tests & Code Quality

## Format and lint

Use

```bash
black .
ruff .
```

Commit pure formatting changes using `chore: formatting`.

## Running tests

```bash
pytest --cov-report term --cov-report xml:coverage.xml --cov=iesopt
pytest
```

This will print a coverage report, which looks like
Expand All @@ -21,3 +32,4 @@ TOTAL 417 172 59%
```

and tells you roughly how good each file is covered by automated tests. Further it creates a `coverage.xml` file in the project root folder, that you can use. In `VSCode`, the extension [Coverage Gutters](https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters) allows inspecting test coverage directly in your code editor. If you have it installed and loaded, simply hit `Ctrl + Shift + 8` (if you are using default keybinds) to enable watching the coverage.

0 comments on commit 9e58285

Please sign in to comment.