mirror of https://github.com/python/cpython.git
Get test to work under regrtest when running whole suite
This commit is contained in:
parent
30b6e8230b
commit
aa1ac546b6
|
@ -3,6 +3,8 @@
|
||||||
import os, sys
|
import os, sys
|
||||||
import shlex
|
import shlex
|
||||||
|
|
||||||
|
from test import test_support
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -187,5 +189,8 @@ def testCompat(self):
|
||||||
if methname.startswith("test") and methname != "testCompat":
|
if methname.startswith("test") and methname != "testCompat":
|
||||||
delattr(ShlexTest, methname)
|
delattr(ShlexTest, methname)
|
||||||
|
|
||||||
|
def test_main():
|
||||||
|
test_support.run_unittest(ShlexTest)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
test_main()
|
||||||
|
|
Loading…
Reference in New Issue