February 2022
Intermediate to advanced
274 pages
6h 28m
English
We’ve covered a lot of markers in this chapter. We used the builtin markers skip, skipif, and xfail. We created our own markers, smoke, exception, finish, and num_cards. There are also a few more builtin markers. And as we start using pytest plugins, those plugins may also include some markers.
To list all the markers available, including descriptions and parameters, run pytest --markers:
| | $ cd /path/to/code/ch6/multiple |
| | $ pytest --markers |
| | @pytest.mark.smoke: subset of tests |
| | |
| | @pytest.mark.exception: check for expected exceptions |
| | |
| | @pytest.mark.finish: all of the "cards finish" related tests |
| | |
| | @pytest.mark.num_cards: number of cards to prefill for cards_db fixture |
| | |
| | ... |
| | |
| | @pytest.mark.skip(reason=None): ... |
Read now
Unlock full access