I am running the following command to run only the tests located inside the file called test_CO2.py
python3.7 -m unittest discover -s some_path/tests/ -p "*CO2*"
My folder structure looks like the following:
some_path/tests/
CO2
test_CO2.py
battery
test_battery.py
tank
test_tank.py
I want to specify the tests that are ran. If for example I only wish to test the tank and CO2 code how can I do that? I thought of passing the following regex:
\w*(CO2|tank)\w*.py which fails to find any tests.
I am thinking that the pattern passed in to the -p option does not accept regex. How, then can I specify the tests I wish to run?