mirror of
https://github.com/python/cpython.git
synced 2025-09-01 14:38:00 +00:00
Get test to work under regrtest when running whole suite
This commit is contained in:
parent
30b6e8230b
commit
aa1ac546b6
1 changed files with 6 additions and 1 deletions
|
@ -3,6 +3,8 @@ import unittest
|
||||||
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 @@ if not getattr(shlex, "split", None):
|
||||||
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…
Add table
Add a link
Reference in a new issue