]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Let mypy ignore expected type errors in sql tests
authorDenis Laxalde <denis.laxalde@dalibo.com>
Tue, 2 Nov 2021 10:26:14 +0000 (11:26 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 3 Nov 2021 15:53:47 +0000 (16:53 +0100)
tests/test_sql.py

index e551eda2370ac94126cbab6add0a2c4ba75c399d..46d78f9e607d104a58e1c6e862b32ff267e7c606 100644 (file)
@@ -248,9 +248,9 @@ class TestIdentifier:
         with pytest.raises(TypeError):
             sql.Identifier()
         with pytest.raises(TypeError):
-            sql.Identifier(10)
+            sql.Identifier(10)  # type: ignore[arg-type]
         with pytest.raises(TypeError):
-            sql.Identifier(dt.date(2016, 12, 31))
+            sql.Identifier(dt.date(2016, 12, 31))  # type: ignore[arg-type]
 
     def test_repr(self):
         obj = sql.Identifier("fo'o")
@@ -356,9 +356,9 @@ class TestSQL:
         assert isinstance(sql.SQL("foo"), sql.SQL)
         assert isinstance(sql.SQL("foo"), sql.SQL)
         with pytest.raises(TypeError):
-            sql.SQL(10)
+            sql.SQL(10)  # type: ignore[arg-type]
         with pytest.raises(TypeError):
-            sql.SQL(dt.date(2016, 12, 31))
+            sql.SQL(dt.date(2016, 12, 31))  # type: ignore[arg-type]
 
     def test_repr(self, conn):
         assert repr(sql.SQL("foo")) == "SQL('foo')"