mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Factor out common boilerplate for test_support
This commit is contained in:
parent
c23fb77477
commit
9dcbbea878
4 changed files with 14 additions and 24 deletions
|
@ -192,24 +192,14 @@ a priority queue (example courtesy of Fredrik Lundh):
|
|||
|
||||
"""
|
||||
|
||||
#==============================================================================
|
||||
|
||||
def makeAllTests():
|
||||
suite = unittest.TestSuite()
|
||||
for klass in (TestBisect,
|
||||
TestInsort
|
||||
):
|
||||
suite.addTest(unittest.makeSuite(klass))
|
||||
return suite
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
__test__ = {'libreftest' : libreftest}
|
||||
|
||||
def test_main(verbose=None):
|
||||
from test import test_bisect
|
||||
suite = makeAllTests()
|
||||
test_support.run_suite(suite)
|
||||
test_support.run_classtests(TestBisect,
|
||||
TestInsort)
|
||||
test_support.run_doctest(test_bisect, verbose)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue