[SciPy-Dev] Run just the test functions that match a given pattern?
Warren Weckesser
warren.weckesser at gmail.com
Sun Apr 19 11:06:57 EDT 2020
With runtests.py, we can run the tests for a specific module (e.g. `-s
stats`), a specific file (e.g. `-t scipy.stats.tests.test_stats`), or
a specific class or function within a file (e.g. `-s
scipy.stats.tests.test_stats::TestCorrPearsonr`, `-s
scipy.stats.tests.test_stats::test_kendalltau`). Is there a way to
run the tests whose names match a given pattern? For example, I'd
like to use the pattern `*ttest_rel*` to run any test that has
`ttest_rel` in its name.
I can hack this by adding the line
python_functions = *ttest_rel*
to pytest.ini, and then comment out that line when I want to run a
larger set of tests, but it would be nice if a pattern could be given
in the command line.
Warren
More information about the SciPy-Dev
mailing list