Is there a way for me to insert a regex so that python unittest will run certain tests in all the test files matching that regular expression?

Viewed 496

So currently my testing folder is divided into directories that contain all the test files IE: test1.py, test2.py etc etc. Each of the testing files contain a certain amount of test methods. Is it possible for me to insert a regular expression so that python unittest will look through ALL the python files and only run those test methods that match the regular expression? I know that python unittest can do this for running all the tests for files that match the regular expression, but I want to run all the METHODS that match the regular expressions by looking through all the files. Thanks!

0 Answers
Related