diff --git a/src/sage/doctest/forker.py b/src/sage/doctest/forker.py index a52485d3d91..6c36ab47baf 100644 --- a/src/sage/doctest/forker.py +++ b/src/sage/doctest/forker.py @@ -553,7 +553,7 @@ def __init__(self, *args, **kwds): self.total_walltime_skips = 0 self.total_performed_tests = 0 self.total_walltime = 0 - if sys.version_info.minor < 13: + if sys.version_info < (3,13): self._stats = self._name2ft def _run(self, test, compileflags, out): @@ -832,7 +832,7 @@ def compiler(example): self.optionflags = original_optionflags # Record and return the number of failures and tries. - if sys.version_info.minor < 13: + if sys.version_info < (3,13): self._DocTestRunner__record_outcome(test, failures, tries) else: self._DocTestRunner__record_outcome(test, failures, tries, walltime_skips)