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