mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Standardize on test.test_support.run_unittest() (as opposed to a mix of run_unittest() and run_suite()). Also, add functionality to run_unittest() that admits usage of unittest.TestLoader.loadTestsFromModule().
This commit is contained in:
parent
0d4c06e06e
commit
c2898c5a67
29 changed files with 87 additions and 180 deletions
|
@ -5,7 +5,7 @@ import os, glob, time, shutil
|
|||
import unicodedata
|
||||
|
||||
import unittest
|
||||
from test.test_support import run_suite, TestSkipped, TESTFN_UNICODE
|
||||
from test.test_support import run_unittest, TestSkipped, TESTFN_UNICODE
|
||||
from test.test_support import TESTFN_ENCODING, TESTFN_UNICODE_UNENCODEABLE
|
||||
try:
|
||||
TESTFN_ENCODED = TESTFN_UNICODE.encode(TESTFN_ENCODING)
|
||||
|
@ -205,9 +205,7 @@ class TestUnicodeFiles(unittest.TestCase):
|
|||
False)
|
||||
|
||||
def test_main():
|
||||
suite = unittest.TestSuite()
|
||||
suite.addTest(unittest.makeSuite(TestUnicodeFiles))
|
||||
run_suite(suite)
|
||||
run_unittest(__name__)
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue