test_ok2/testing
Florian Bruhin 7690a0ddf1
Improve error message when using @pytest.fixture twice (#11670)
* Improve error message when using @pytest.fixture twice

While obvious in hindsight, this error message confused me. I thought my fixture
function was used in a test function twice, since the wording is ambiguous.

Also, the error does not tell me *which* function is the culprit.

Finally, this adds a test, which wasn't done in
cfd16d0dac where this was originally implemented.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-02-09 14:59:04 +01:00
..
_py [flake8-bugbear] Fix all the useless expressions that are justified 2024-02-04 19:27:23 +01:00
code [flake8-bugbear] Fix all the useless expressions that are justified 2024-02-04 19:27:23 +01:00
example_scripts Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
examples fix bug in test for issue 519 2021-03-07 15:01:39 +01:00
freeze [ruff] Fix all consider [*cats, garfield] instead of cats + [garfield] 2024-02-02 15:18:38 +01:00
io [ruff] Fix ambiguous characters found in string and comment 2024-02-02 15:18:38 +01:00
logging [ruff] Add ruff's check and autofix existing issues 2024-02-02 15:18:38 +01:00
plugins_integration build(deps): Bump django in /testing/plugins_integration (#11946) 2024-02-07 15:37:56 -03:00
python Improve error message when using @pytest.fixture twice (#11670) 2024-02-09 14:59:04 +01:00
acceptance_test.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
conftest.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
deprecated_test.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_argcomplete.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_assertion.py Enable flake8-pie 2024-02-09 11:08:33 +02:00
test_assertrewrite.py Enable lint PGH004 - Use specific rule codes when using noqa 2024-02-09 11:14:36 +02:00
test_cacheprovider.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_capture.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_collection.py Enable lint PGH004 - Use specific rule codes when using noqa 2024-02-09 11:14:36 +02:00
test_compat.py [flake8-bugbear] Fixes a B017 we can actually fix and noqa the two others 2024-02-04 19:27:23 +01:00
test_config.py Enable flake8-pie 2024-02-09 11:08:33 +02:00
test_conftest.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_debugging.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_doctest.py doctest: fix autouse fixtures possibly not getting picked up 2024-02-07 21:53:51 +02:00
test_entry_points.py mypy: disallow untyped defs by default (#11862) 2024-01-28 10:12:42 -03:00
test_error_diffs.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_faulthandler.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_findpaths.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_helpconfig.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_junitxml.py [ruff] Fix all consider [*cats, garfield] instead of cats + [garfield] 2024-02-02 15:18:38 +01:00
test_legacypath.py [flake8-bugbear] Fix all the useless expressions that are justified 2024-02-04 19:27:23 +01:00
test_link_resolve.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_main.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_mark.py [flake8-bugbear] Fix all the useless expressions that are justified 2024-02-04 19:27:23 +01:00
test_mark_expression.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_meta.py Run pre-commit on all files 2024-01-30 16:35:46 -03:00
test_monkeypatch.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_nodes.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_parseopt.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_pastebin.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_pathlib.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_pluginmanager.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_pytester.py [ruff] Add ruff's check and autofix existing issues 2024-02-02 15:18:38 +01:00
test_python_path.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_recwarn.py closes: 10865 Fix muted exception (#11804) 2024-02-07 16:47:56 -08:00
test_reports.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_runner.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_runner_xunit.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_scope.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_session.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_setuponly.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_setupplan.py #7942 test_setupplan.py migrate from testdir to Pytester (#8004) 2020-11-07 09:29:45 -03:00
test_skipping.py Enable flake8-pie 2024-02-09 11:08:33 +02:00
test_stash.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_stepwise.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_terminal.py [flake8-pyi] Add checks for flake8-pyi and fix existing 2024-02-04 19:27:23 +01:00
test_threadexception.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_tmpdir.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_unittest.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_unraisableexception.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_warning_types.py Migrate from autoflake, black, isort, pyupgrade, flake8 and pydocstyle, to ruff 2024-02-02 09:27:00 +01:00
test_warnings.py Enable lint PGH004 - Use specific rule codes when using noqa 2024-02-09 11:14:36 +02:00
typing_checks.py mypy: disallow untyped defs by default (#11862) 2024-01-28 10:12:42 -03:00