Skip to content

Commit 8245277

Browse files
committed
Fix: update dev file with test instructions
1 parent b3c4b41 commit 8245277

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

development.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,31 @@ pyosMeta uses hatch and hatchling as it's build back end.
66

77
## Running tests
88

9-
To install tests:
9+
We use Hatch scripts to automate workflows. 🚀
1010

11-
`python -m pip install ".[tests]"`
11+
To run tests there is a single hatch environment parsed with three
12+
script options that you can chose to run.
1213

13-
We use Hatch scripts to automate workflows.
14+
1. To run only tests with a code coverage report out in the terminal use:
1415

15-
To run tests, you can use:
16+
`hatch run test:run-coverage`
1617

17-
`hatch run test:run-tests`
18+
2. To run tests without code coverage report outs use :
19+
`hatch run test:run-coverage`
20+
21+
3. To run tests with an xml report generated use:
22+
`hatch run test:run-report`
23+
24+
The hatch run-report script is the script used in our CI tests action.
25+
26+
### Modify test scripts
27+
28+
To modify how scripts ar run, you can look at this section in our
29+
pyproject.toml file:
30+
31+
```toml
32+
[tool.hatch.envs.test.scripts]
33+
run-coverage = "pytest --cov-config=pyproject.toml --cov=pyosmeta --cov=tests/*"
34+
run-no-cov = "run-coverage --no-cov"
35+
run-report = "run-coverage --cov-report=xml:coverage.xml"
36+
```

0 commit comments

Comments
 (0)