test_ok2/testing
Jon Parise 8ac6dce2c7
Add shell-style wildcard support to 'testpaths' (#9897)
This is especially useful for large repositories (e.g. monorepos) that
use a hierarchical file system organization for nested test paths.

    src/*/tests

The implementation uses the standard `glob` module to perform wildcard
expansion in Config.parse().

The related logic that determines whether or not to include 'testpaths'
in the terminal header was previously relying on a weak heuristic: if
Config.args matched 'testpaths', then its value was printed. That
generally worked, but it could also print when the user explicitly used
the same arguments on the command-line as listed in 'testpaths'. Not a
big deal, but it shows that the check was logically incorrect.

Now that 'testpaths' can contain wildcards, it's no longer possible to
perform this simple comparison, so this change also introduces a public
Config.ArgSource enum and Config.args_source attribute that explicitly
names the "source" of the arguments: the command line, the invocation
directory, or the 'testdata' configuration value.
2022-05-24 10:20:51 +02:00
..
code Enhance errors for exception/warnings matching (#8508) 2022-03-20 23:32:39 -03:00
example_scripts fix comparison of dataclasses with `InitVar` 2022-04-08 19:51:05 -04:00
examples fix bug in test for issue 519 2021-03-07 15:01:39 +01:00
freeze testing: fix some docstring issues 2020-08-03 10:10:43 +03:00
io Remove newlines from left/right operands with '-vv' (#9743) 2022-03-19 11:55:39 +00:00
logging Use {node,config}.stash instead of ._store 2021-07-24 17:40:08 +03:00
plugins_integration build(deps): Bump anyio[curio,trio] in /testing/plugins_integration 2022-05-16 03:02:09 +00:00
python type-ignore in error-message test 2022-05-10 23:24:13 -07:00
acceptance_test.py Fix tests 2022-03-29 12:33:13 +02:00
conftest.py Rename pathlib hook parameters (#9363) 2021-12-03 13:14:09 +01:00
deprecated_test.py Revert "Deprecate raising unittest.SkipTest to skip tests during collection" (#9710) 2022-02-23 15:59:54 +02:00
test_argcomplete.py pytest-dev#8204 migrate some tests to tmp_path fixture (#8209) 2021-01-01 17:25:11 +02:00
test_assertion.py fix comparison of dataclasses with `InitVar` 2022-04-08 19:51:05 -04:00
test_assertrewrite.py Merge pull request #9768 from bluetech/fix-tests-verbose 2022-03-17 18:17:17 +02:00
test_cacheprovider.py Fix count of selected tests on terminal collection summary (#9628) 2022-02-15 11:17:34 +00:00
test_capture.py Drop support for EOL Python 3.6 2021-12-30 12:37:18 +02:00
test_collection.py Add shell-style wildcard support to 'testpaths' (#9897) 2022-05-24 10:20:51 +02:00
test_compat.py Enable testing with Python 3.11 (#9511) 2022-02-11 15:20:42 +00:00
test_config.py Fix more tests 2022-03-29 12:34:15 +02:00
test_conftest.py testing: fix Path.rglob("") failures in Python 3.11b1 2022-05-09 12:52:57 +03:00
test_debugging.py Remove breakpoint support checking since all python versions support it. 2021-12-28 10:11:45 +01:00
test_doctest.py prevent import-time side-effects from setuptools bundled importlib-metadata 2022-02-28 19:35:36 -05:00
test_entry_points.py Replace importlib_metadata with importlib.metadata on Python 3.8+ 2019-07-04 15:00:10 +02:00
test_error_diffs.py Fix diff output for data types where `-v` would show less information (#9661) 2022-02-15 09:43:20 -03:00
test_faulthandler.py Only re-enable fauthandler during unconfigure if it was enabled before 2021-01-25 12:28:00 -03:00
test_findpaths.py Add a test for invalid TOML file 2021-07-06 16:53:32 +03:00
test_helpconfig.py Remove py version printing, traceback filtering, freezing 2021-10-16 12:01:31 +03:00
test_junitxml.py Rename pathlib hook parameters (#9363) 2021-12-03 13:14:09 +01:00
test_legacypath.py Ensure Config.inifile is available during pytest_cmdline_main 2022-01-04 10:03:28 -03:00
test_link_resolve.py tests: Migrate to pytester - final update 2020-12-18 11:02:38 -08:00
test_main.py Enable testing with Python 3.11 (#9511) 2022-02-11 15:20:42 +00:00
test_mark.py Remove deprecated `-k foobar:` syntax 2021-12-07 22:27:35 +02:00
test_mark_expression.py Support forwardslash characters in identifiers (#9249) 2021-11-01 08:54:18 +02:00
test_meta.py py36+: com2ann 2020-10-05 18:33:17 -07:00
test_monkeypatch.py testing/test_monkeypatch: fix some patches leaking into pytest code 2022-01-09 00:13:40 +02:00
test_nodes.py Delay warning about collector/item diamond inheritance 2022-02-10 13:50:25 -03:00
test_nose.py Revert "Deprecate raising unittest.SkipTest to skip tests during collection" (#9710) 2022-02-23 15:59:54 +02:00
test_parseopt.py Update syntax to Python3.7+. 2021-12-28 10:11:35 +01:00
test_pastebin.py fix typing issues in mypy 0.920 2021-12-21 20:42:32 -05:00
test_pathlib.py Try to import module before creating dummy modules with 'importmode=importlib' 2022-02-14 09:42:05 -03:00
test_pluginmanager.py Adjust doc links for new scheme 2021-07-06 09:11:35 +02:00
test_pytester.py pytester now requests monkeypatch instead of creating its own instance 2022-03-04 08:58:44 -05:00
test_python_path.py Rename ``pythonpath`` plugin to ``python_path`` 2022-02-09 10:03:20 +02:00
test_recwarn.py Enhance errors for exception/warnings matching (#8508) 2022-03-20 23:32:39 -03:00
test_reports.py reports: support any PathLike instead of only Path, py.path 2021-03-18 10:23:48 +02:00
test_runner.py Fix typos (#9424) 2021-12-27 09:23:15 -03:00
test_runner_xunit.py [pre-commit.ci] pre-commit autoupdate (#8201) 2020-12-30 11:56:09 +02:00
test_scope.py Refactor internal scope handling by introducing Scope enum 2021-08-01 06:11:56 -03:00
test_session.py testing/test_session: add a regression test for an old bug 2021-11-15 23:22:54 +02:00
test_setuponly.py Migrate test_setuponly.py from testdir to pytester (#7959) 2020-10-29 09:55:30 +02: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 Add colors to summary (#9875) 2022-05-12 09:55:40 -03:00
test_stash.py Fix typos (#9424) 2021-12-27 09:23:15 -03:00
test_stepwise.py #9062 - Allow `--stepwise-skip` to implicitly enable `--stepwise` (#9064) 2021-08-30 19:24:14 +01:00
test_terminal.py Do not truncate crash messages in short test summary on CI (#9933) 2022-05-13 08:15:52 -03:00
test_threadexception.py Fix warning filters used in tests 2021-05-04 17:25:02 +02:00
test_tmpdir.py Move tmpdir to legacypath plugin 2021-10-28 21:51:51 +03:00
test_unittest.py Revert "Deprecate raising unittest.SkipTest to skip tests during collection" (#9710) 2022-02-23 15:59:54 +02:00
test_unraisableexception.py Fix warning filters used in tests 2021-05-04 17:25:02 +02:00
test_warning_types.py add type hint to parametrized warning_class 2020-10-25 18:31:43 +00:00
test_warnings.py Expand warnings output for ResourceWarning (#9682) 2022-02-15 13:00:50 +00:00
typing_checks.py Fix typing of params ids callable form 2020-07-14 14:53:42 +03:00