From: Denis Laxalde Date: Tue, 2 Nov 2021 10:26:14 +0000 (+0100) Subject: Let mypy ignore expected type errors in sql tests X-Git-Tag: 3.0.2~4^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39e0e360152997740830804dd1fc0deb5204abb3;p=thirdparty%2Fpsycopg.git Let mypy ignore expected type errors in sql tests --- diff --git a/tests/test_sql.py b/tests/test_sql.py index e551eda23..46d78f9e6 100644 --- a/tests/test_sql.py +++ b/tests/test_sql.py @@ -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')"