pytest
pytest copied to clipboard
The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
Someone in a pytest training of mine was surprised that: ```python import pytest @pytest.mark.parametrize("a", ["a1", "a2"]) @pytest.mark.parametrize("b", ["b1", "b2"]) def test_permutations(a, b): ... ``` results in pytest collecting: - `test_permutations[b1-a1]`...
#### What's the problem this feature will solve? I do use `--last-failed` to rerun flaky tests. This works perfectly fine in formal testing of libraries, however when I use the...
### Reproduce steps ```bash # Create the main directory structure mkdir -p test-pytest-collect/parent/sub1 mkdir -p test-pytest-collect/parent/sub2 mkdir -p test-pytest-collect/parent/sub3 # Create test files as one-liners echo "def test_sub1(): pass" >...
- [x] a detailed description of the bug or problem you are having - [x] output of `pip list` from the virtual environment you are using - [x] pytest and...
#### What's the problem this feature will solve? The documentation for `-p` and `PYTEST_PLUGINS` differs and appears incomplete. In particular (in all the below, `PYTEST_DISABLE_PLUGIN_AUTOLOAD=1`): - Their relation is unclear...
As part of our build process, we run the test suite _after_ creating the packaging to check that the installed package works as intended. We recently added an option to...
Following all the many posts about namespaces, I have the following setup, using pytest 8.3.4 and poetry 0.1.0: In pyproject.toml: ``` [tool.pytest.ini_options] consider_namespace_packages=true addopts = [ "--import-mode=importlib", ] ``` My...
Add Missing Docstrings to validate_basetemp in main.py.