Stop holding a reference to the TestCase at index.
(self, index)
| 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) |