From: Daniele Varrazzo Date: Wed, 9 Jun 2021 16:28:32 +0000 (+0100) Subject: Fix reveal_type tests to mypy 0.901 output format X-Git-Tag: 3.0.dev0~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=308a38713eada0133b35e30f0b3fe779456f7e2b;p=thirdparty%2Fpsycopg.git Fix reveal_type tests to mypy 0.901 output format --- diff --git a/tests/test_typing.py b/tests/test_typing.py index cca856bf8..6e5318534 100644 --- a/tests/test_typing.py +++ b/tests/test_typing.py @@ -307,7 +307,9 @@ reveal_type(ref) out = cp.stdout.decode("utf8", "replace").splitlines() assert len(out) == 2, "\n".join(out) got, want = [ - re.sub(r".*Revealed type is '([^']+)'.*", r"\1", line).replace("*", "") + re.sub(r".*Revealed type is (['\"])([^']+)\1.*", r"\2", line).replace( + "*", "" + ) for line in out ] assert got == want