Configuring Checker¶
The checker plugin comes with a custom marker called check_config that you can use for configuring the checker on a per-test basis.
To use it, just import the object, and decorate your tests with it.
from zeloscloud.pytest.checker import check_config
@check_config(config_option=config_value)
def test_foo(check):
Note
config_option=config_value is not a real config option/value. It's just an example. Please see below for a look at real options and what they do!
Configuration Options¶
Below is a table of the available configuration options for check_config:
| Option | Description | Default |
|---|---|---|
fail_fast |
Determines whether the test should halt on the first failure. | True |
Using fail_fast¶
By default, fail_fast is set to True. This means a test will halt of the first failure.
def test_default_behaviour(check):
check.that(1, "==", 1) # This will pass
check.that(1, "==", 2) # This will fail, and the test stops here
# Any code here will not execute
fail_fast to False: