MCPcopy Index your code
hub / github.com/python/cpython / addTest

Method addTest

Lib/unittest/suite.py:44–52  ·  view source on GitHub ↗
(self, test)

Source from the content-addressed store, hash-verified

42 return cases
43
44 def addTest(self, test):
45 # sanity checks
46 if not callable(test):
47 raise TypeError("{} is not callable".format(repr(test)))
48 if isinstance(test, type) and issubclass(test,
49 (case.TestCase, TestSuite)):
50 raise TypeError("TestCases and TestSuites must be instantiated "
51 "before passing them to addTest()")
52 self._tests.append(test)
53
54 def addTests(self, tests):
55 if isinstance(tests, str):

Callers 15

addTestsMethod · 0.95
DocTestSuiteFunction · 0.80
DocFileSuiteFunction · 0.80
load_testsFunction · 0.80
load_testsFunction · 0.80
load_testsFunction · 0.80
load_testsFunction · 0.80
load_testsFunction · 0.80
load_testsFunction · 0.80
load_testsFunction · 0.80
load_testsFunction · 0.80
load_testsFunction · 0.80

Calls 2

formatMethod · 0.45
appendMethod · 0.45

Tested by 15

DocTestSuiteFunction · 0.64
DocFileSuiteFunction · 0.64
load_testsFunction · 0.64
load_testsFunction · 0.64
load_testsFunction · 0.64
load_testsFunction · 0.64
load_testsFunction · 0.64
load_testsFunction · 0.64
load_testsFunction · 0.64
load_testsFunction · 0.64
load_testsFunction · 0.64
load_testsFunction · 0.64