(self, *args)
| 23 | |
| 24 | @contextlib.contextmanager |
| 25 | def subTest(self, *args): |
| 26 | with super().subTest(*args) as ctx: |
| 27 | self._subtest_count += 1 |
| 28 | try: |
| 29 | yield ctx |
| 30 | finally: |
| 31 | if self._debugged_in_subtest: |
| 32 | if self._subtest_count == 1: |
| 33 | # The first subtest adds a leading newline, so we |
| 34 | # compensate here by not printing a trailing newline. |
| 35 | print('### end subtest debug ###', end='') |
| 36 | else: |
| 37 | print('### end subtest debug ###') |
| 38 | self._debugged_in_subtest = False |
| 39 | |
| 40 | def debug(self, msg, *, header=None): |
| 41 | if header: |
no test coverage detected