[Patches] [ python-Patches-804212 ] unittest's main don't handle
TestSuite in command line
SourceForge.net
noreply at sourceforge.net
Mon Sep 15 14:31:45 EDT 2003
Patches item #804212, was opened at 2003-09-11 01:52
Message generated for change (Settings changed) made by rhettinger
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=804212&group_id=5470
Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Miki Tebeka (tebeka)
>Assigned to: Steve Purcell (purcell)
Summary: unittest's main don't handle TestSuite in command line
Initial Comment:
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
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=804212&group_id=5470
More information about the Patches
mailing list