MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_blob_open_error

Method test_blob_open_error

Lib/test/test_sqlite3/test_dbapi.py:1340–1351  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1338 ro_blob.close()
1339
1340 def test_blob_open_error(self):
1341 dataset = (
1342 (("test", "b", 1), {"name": "notexisting"}),
1343 (("notexisting", "b", 1), {}),
1344 (("test", "notexisting", 1), {}),
1345 (("test", "b", 2), {}),
1346 )
1347 regex = "no such"
1348 for args, kwds in dataset:
1349 with self.subTest(args=args, kwds=kwds):
1350 with self.assertRaisesRegex(sqlite.OperationalError, regex):
1351 self.cx.blobopen(*args, **kwds)
1352
1353 def test_blob_length(self):
1354 self.assertEqual(len(self.blob), 50)

Callers

nothing calls this directly

Calls 3

subTestMethod · 0.80
assertRaisesRegexMethod · 0.80
blobopenMethod · 0.80

Tested by

no test coverage detected