Skip to content

Commit

Permalink
Address review
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Nov 4, 2024
1 parent f420397 commit c7bd2a6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Lib/test/libregrtest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,9 @@ def display_summary(self) -> None:
print()
print("Total duration: %s" % format_duration(duration))

assert self.first_runtests, "self.first_runtests is None"
assert self.first_runtests, (
"Should never call `display_summary()` before calling `_run_test()`"
)
self.results.display_summary(self.first_runtests, filtered)

# Result
Expand Down Expand Up @@ -715,7 +717,9 @@ def _init(self):

@property
def tmp_dir(self) -> StrPath:
assert self._tmp_dir is not None, "self._tmp_dir is None"
assert self._tmp_dir is not None, (
"Should never use `.tmp_dir` before calling `.main()`"
)
return self._tmp_dir

def main(self, tests: TestList | None = None) -> NoReturn:
Expand Down

0 comments on commit c7bd2a6

Please sign in to comment.