pytest
pytest copied to clipboard
The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
This PR aims to solve this issue #12091. In the issue example shown below, `fixturedefs` defined [here](https://github.com/pytest-dev/pytest/blob/14437788f07584fcf0578bdb952c720e0b9dd2ab/src/_pytest/fixtures.py#L1535) was returning a tuple of the two versions of the overridden `main` fixture....
Raising an exception in `pytest_runtest_teardown` in one test will cause an exception in all subsequent tests. This is a regression from 5.2.4 and earlier releases. I use exceptions in `pytest_runtest_teardown`...
Closes #11295 by excluding 'pseudo fixtures' from the `--fixtures-per-test` output. > pseudo fixtures are neither builtin fixtures nor ones created by the user with the `pytest.fixture` decorator. They are created...
I'm trying to update from pytest v6.2.5 to v7.0.0 via https://github.com/cherrypy/cheroot/pull/475 and it fails the testing weirdly with $sbj. The assertion error in question comes from the pytest's internals. Looking...
I am fairly new to pytest and I see that scope of a parameterized fixture is not working. Here is an example of the fixture and the test: ``` @pytest.fixture(scope='session')...
I'm open to adding a changelog item, but as I generally get pushback on some changes in long sets, I'm disinclined to write it proactively as I don't know what...
- [X] a detailed description of the bug or problem you are having [the documentation for `pytest_assertrepr_compare`](https://docs.pytest.org/en/latest/reference/reference.html#pytest.hookspec.pytest_assertrepr_compare) states that this hook is only called when an assertion fails. however if...
When I have the following situation: * A fixture `main` that uses another fixture `param` * A test class `TestFoo` that: * overrides the `main` fixture with a fixture that...
#### What's the problem this feature will solve? In projects with lots of parametrized tests across versions, behaviour, etc - or with lots of tests in general - I like...
Would it be possible to add an option to load the initial conftest.py from the rootdir (which can be specified on the commandline) instead of using the automatic discovery that...