MCPcopy Index your code
hub / github.com/RustPython/RustPython / _removeTestAtIndex

Method _removeTestAtIndex

Lib/unittest/suite.py:68–80  ·  view source on GitHub ↗

Stop holding a reference to the TestCase at index.

(self, index)

Source from the content-addressed store, hash-verified

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

Callers 4

runMethod · 0.95
runMethod · 0.45

Calls 2

hasattrFunction · 0.85
countTestCasesMethod · 0.45