(self)
| 291 | |
| 292 | @unittest.skipUnless(dbm_sqlite3, reason='Test requires dbm.sqlite3') |
| 293 | def test_whichdb_sqlite3_existing_db(self): |
| 294 | # Existing sqlite3 databases are detected correctly. |
| 295 | sqlite3 = import_helper.import_module("sqlite3") |
| 296 | try: |
| 297 | # Create an empty database. |
| 298 | with sqlite3.connect(_fname) as cx: |
| 299 | cx.execute("CREATE TABLE dummy(database)") |
| 300 | cx.commit() |
| 301 | finally: |
| 302 | cx.close() |
| 303 | self.assertEqual(self.dbm.whichdb(_fname), "dbm.sqlite3") |
| 304 | |
| 305 | |
| 306 | def setUp(self): |
nothing calls this directly
no test coverage detected