mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-23 10:39:16 +00:00
Update pytest how to for BIND system tests: add hypothesis command line switches
parent
6c368874a9
commit
35bedb22c8
@ -3,6 +3,7 @@ title: pytest how-to for BIND system tests
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
See [[/bin/tests/system/README|/../blob/main/bin/tests/system/README.md]] first
|
See [[/bin/tests/system/README|/../blob/main/bin/tests/system/README.md]] first
|
||||||
|
|
||||||
# Debugging
|
# Debugging
|
||||||
@ -16,3 +17,7 @@ Pytest has framework for providing 'context' to tests in a consistent manner. Th
|
|||||||
|
|
||||||
# Runtime data
|
# Runtime data
|
||||||
As a very first step, Pytest "collects" tests: Effectively it imports all Python files without executing test functions and does filtering (e.g. for `-k` command line parameter), and it executes `setup.sh` and other code only for tests which were selected/passed all conditions. For this reason you cannot access any files/data generated by `setup.sh` from _outside_ of test function body. This limitation applies also to arguments of @decorators around test functions.
|
As a very first step, Pytest "collects" tests: Effectively it imports all Python files without executing test functions and does filtering (e.g. for `-k` command line parameter), and it executes `setup.sh` and other code only for tests which were selected/passed all conditions. For this reason you cannot access any files/data generated by `setup.sh` from _outside_ of test function body. This limitation applies also to arguments of @decorators around test functions.
|
||||||
|
|
||||||
|
# Hypothesis library
|
||||||
|
- `--hypothesis-show-statistics` to see how many examples the library generated and how many got actually executed
|
||||||
|
- `--hypothesis-seed=0` to get de-randomized behavior for debugging
|
Loading…
x
Reference in New Issue
Block a user