Run a single Python unittest
If you maintain your unittest
tests as a package, you can run a single one like this
python -m unittest test.test_download.TestDownload.test_NowVideo
tox test.test_download:TestDownload.test_NowVideo
If instead of a package you have plain files, go for this syntax
python test/test_download.py TestDownload.test_NowVideo
but make sure that you have something like this at the end of the test file
if __name__ == '__main__':
unittest.main()
Written by Filippo Valsorda
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#