Get test to work under regrtest when running whole suite

This commit is contained in:
Neal Norwitz 2003-04-17 23:04:22 +00:00
parent 30b6e8230b
commit aa1ac546b6
1 changed files with 6 additions and 1 deletions

View File

@ -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()