Issue 804212: unittest's main don't handle TestSuite in command line (original) (raw)
When using unittest's "main" it fails if in the command line a name of TestSuite class is given.
Suppose ts.py is:
#!/usr/bin/env python
from unittest import TestCase, makeSuite, main
class T(TestCase): def test_moo(self): self.fail()
test_suite = makeSuite(T, "test_")
if name == "main": main()
Then running "ts.py test_suite" will fail.
Attached is a patch for unittest.py
Miki