python -m unittest discover

…should work fine when you have set everything up with a bit of forethought

If you see response ‘Ran 0 tests’ then try

touch tests/__init__.py

If you fail to create an empty __init__.py in your tests folder, then Python (rightly) will not recognise it [ as a module ]

Rerun your discover command and if missing __init__.py was holding you up, then you should now be further along.

Along the way you have just learned a little about project structure, and Python requirements generally for modularised code.

Advertisements