Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a861358

Browse files
author
Erlend E. Aasland
committed
Add test for 'database' keyword
1 parent d361aeb commit a861358

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/sqlite3/test/dbapi.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ def test_open_uri(self):
191191
with self.assertRaises(sqlite.OperationalError):
192192
cx.execute('insert into test(id) values(1)')
193193

194+
def test_database_keyword(self):
195+
with sqlite.connect(database=":memory:") as cx:
196+
self.assertEqual(type(cx), sqlite.Connection)
197+
194198

195199
class CursorTests(unittest.TestCase):
196200
def setUp(self):

0 commit comments

Comments
 (0)