Skip to content Skip to sidebar Skip to footer

Run A Single Test Via A Command Line When Tests Are Located Within A Sibling Folder

I have a folder structure: app/ | |-src/ | | | |-Code.py | |-tests/ | |-__init__.py |-test_Code.py I run my tests by issuing a command: app$ python3 -m unittest discover An

Solution 1:

This should work.

python -m unittest -v tests.test_Code.TestCase1.test_Code1

Assuming that src is a also a module


Post a Comment for "Run A Single Test Via A Command Line When Tests Are Located Within A Sibling Folder"