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

Method _removeTestAtIndex

Lib/unittest/suite.py:69–81  ·  view source on GitHub ↗

Stop holding a reference to the TestCase at index.

(self, index)

Source from the content-addressed store, hash-verified

67 return result
68
69 def _removeTestAtIndex(self, index):
70 """Stop holding a reference to the TestCase at index."""
71 try:
72 test = self._tests[index]
73 except TypeError:
74 # support for suite implementations that have overridden self._tests
75 pass
76 else:
77 # Some unittest tests add non TestCase/TestSuite objects to
78 # the suite.
79 if hasattr(test, 'countTestCases'):
80 self._removed_tests += test.countTestCases()
81 self._tests[index] = None
82
83 def __call__(self, *args, **kwds):
84 return self.run(*args, **kwds)

Callers 4

runMethod · 0.95
runMethod · 0.45

Calls 1

countTestCasesMethod · 0.45