]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Fix reveal_type tests to mypy 0.901 output format
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 9 Jun 2021 16:28:32 +0000 (17:28 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 9 Jun 2021 16:29:34 +0000 (17:29 +0100)
tests/test_typing.py

index cca856bf83261e033b0d8a9a85ccc9ec7492ab28..6e531853400b515e40c2002a477b52bc739e6b30 100644 (file)
@@ -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