iotests: correct resultclass type in ReproducibleTestRunner
authorJohn Snow <jsnow@redhat.com>
Fri, 1 Nov 2024 17:36:58 +0000 (13:36 -0400)
committerKevin Wolf <kwolf@redhat.com>
Mon, 25 Nov 2024 10:03:14 +0000 (11:03 +0100)
I have a vague memory that I suggested this base class to Vladimir and
said "Maybe someday it will break, and I'll just fix it then." Guess
that's today.

Fixes various mypy errors in the "make check-tox" python test for at
least Python3.8; seemingly requires a fairly modern mypy and/or Python
base version to trigger.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-ID: <20241101173700.965776-3-jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/iotests.py

index 673bbcd3563b11327ec5cf661ac0ef946e0ac9eb..19817c735305bf8ae6086dc8b2dea3e964d9de80 100644 (file)
@@ -1617,7 +1617,7 @@ class ReproducibleTestRunner(unittest.TextTestRunner):
     def __init__(
         self,
         stream: Optional[TextIO] = None,
-        resultclass: Type[unittest.TestResult] =
+        resultclass: Type[unittest.TextTestResult] =
         ReproducibleTestResult,
         **kwargs: Any
     ) -> None: