From 4ee6346eb2b03ff55ecd35e5d5b4ecedd937dbef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Sch=C3=BCtt?= Date: Thu, 28 Oct 2021 12:30:52 +0200 Subject: [PATCH] regtesting: Remove dependency on typing_extensions --- tools/regtesting/do_regtest.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/regtesting/do_regtest.py b/tools/regtesting/do_regtest.py index fe7ac5d644..04fb548be3 100755 --- a/tools/regtesting/do_regtest.py +++ b/tools/regtesting/do_regtest.py @@ -19,9 +19,11 @@ import time from typing import Coroutine, TextIO try: - from typing import Literal + from typing import Literal # not available before Python 3.8 + + TestStatus = Literal["OK", "WRONG RESULT", "RUNTIME FAIL", "TIMEOUT"] except: - from typing_extensions import Literal # type: ignore + TestStatus = str # type: ignore # Some tests do not work with --keepalive (which is generally considered a bug). KEEPALIVE_SKIP_DIRS = [ @@ -300,9 +302,6 @@ class Batch: return True -# ====================================================================================== -TestStatus = Literal["OK", "WRONG RESULT", "RUNTIME FAIL", "TIMEOUT"] - # ====================================================================================== class TestResult: def __init__(