Skip to content

Commit

Permalink
Test deserialize type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Erlend E. Aasland committed Jun 16, 2021
1 parent 125a58c commit 42f8cd5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Lib/sqlite3/test/dbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ def test_serialize_deserialize(self):
cx.execute("select t from t")
cx.close()

def test_deserialize_wrong_args(self):
cx = sqlite.connect(":memory:")
self.assertRaises(TypeError, cx.deserialize, [])
self.assertRaises(TypeError, cx.deserialize, None)
self.assertRaises(TypeError, cx.deserialize, 1)


class OpenTests(unittest.TestCase):
_sql = "create table test(id integer)"
Expand Down

0 comments on commit 42f8cd5

Please sign in to comment.