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