pytest
pytest copied to clipboard
The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
Sometimes a test should _always_ be skipped, e.g. because we generate tests by first generating all possible combinations of parameters and then calling pytest.skip inside the test function for combinations...
this is a old pr where i play around with configuration
#### What's the problem this feature will solve? Partitioned off of https://github.com/pytest-dev/pytest/issues/5243 When a fixture creates an external resource, this plugin would provide a mechanism to handle gracefully tearing down...
Sphinx 4 (or releases since) provides two nice things (see [changelog](https://www.sphinx-doc.org/en/master/changes.html)): - It supports "canonical" names for types. I'm not sure exactly what it is, but makes a lot more...
Ref: https://github.com/pytest-dev/pytest/issues/5584, https://github.com/pytest-dev/pytest/pull/7362 Note: originally this was meant to be integrated in 7.0 in #8837, but we decided to postpone it as per https://github.com/pytest-dev/pytest/pull/8837#issuecomment-872138897.
Fixes #10023 Add note to clarify the difference in execution order between after-yield finalizers and `request.addfinalizer` finalizers.
This is very important if you are creating fixtures which interact with others which were not written with `yield`, and is extra confusing when writing tests which themselves *do* use...
Pytest 7.1.0 plugins: asyncio-0.19.0, repeat-0.9.1 When using the `capsys` fixture, starting an async StreamWriter using the `stdout` or `stderr` pipes fails under test and works in regular Python. It looks...
My particular case was that I wanted a session-scoped fixture which was parametrized by some CLI arguments. This was much tougher than I expected it to be, and I think...
pytest looks in the tests' directory, or one of its parents directory, for a configuration file such as `pytest.ini` or `tox.ini` and uses the first one it finds. But how...