pytest
pytest copied to clipboard
The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
Followed the suggestions on this issue and added a default value to the verbose mode calls as it does in some of the other sections of the code. Refs #9422
_Originally asked about in #10391 and deemed to be a bug by @RonnyPfannschmidt_ --- Suppose I have a test class for which I want to turn warnings into errors. However,...
- [x] a detailed description of the bug or problem you are having When importing a package for its plugin, pytest lets any warnings fall to the ground. This means...
This is a feature request for adding a `check_stacklevel` flag to `pytest.warns`. This helps library authors test that warnings point back to the user's source code, rather than some internal...
#### What's the problem this feature will solve? I create random users for the tests. I use factories according to https://docs.pytest.org/en/latest/how-to/fixtures.html#factories-as-fixtures The user creation is quite expensive (in time), so...
#### What's the problem this feature will solve? I'm writing some fixtures and integration tests using live, authenticated connections to a test instance of a service. My test infrastructure can...
As someone pointed out in my pytest training, pytest currently silently accepts: ```python def test_fixt(fixt=42): ... ``` with `fixt` obviously being `42` in the test function no matter if such...
Should we include/ship shell completion with pytest, e.g. in a `contrib` folder? I have something for Zsh: https://github.com/zsh-users/zsh-completions/pull/454/files. Added to my dotfiles: https://github.com/blueyed/oh-my-zsh/commit/fd89b191b808adc4c913f667109d5c9702bba713 (2020-03-01)
- [ ] a detailed description of the bug or problem you are having with --durations=0 I get each test listed twice ``` ======================================================================================================================================== slowest durations ======================================================================================================================================== 150.30s call tests/test_10_scim_delete.py::TestClass::test01_prereg_delete_users[test12]...
Prior to pytest 7, pytest would exercise doctests in `__main__`. https://github.com/pytest-dev/pytest/pull/8949 changed that expectation (and for good reason). In my use-case, I always put a `__name__ == '__main__'` check in...