Python code coverage for Doc/includes/sqlite3/parse_colnames.py
# | count | content |
---|---|---|
1 | n/a | import sqlite3 |
2 | n/a | import datetime |
3 | n/a | |
4 | n/a | con = sqlite3.connect(":memory:", detect_types=sqlite3.PARSE_COLNAMES) |
5 | n/a | cur = con.cursor() |
6 | n/a | cur.execute('select ? as "x [timestamp]"', (datetime.datetime.now(),)) |
7 | n/a | dt = cur.fetchone()[0] |
8 | n/a | print(dt, type(dt)) |