You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
312 B
15 lines
312 B
import sqlite3
|
|
|
|
con = sqlite3.connect(":memory:")
|
|
con.row_factory = sqlite3.Row
|
|
|
|
cur = con.cursor()
|
|
cur.execute("select 'John' as name, 42 as age")
|
|
for row in cur:
|
|
assert row[0] == row["name"]
|
|
assert row["name"] == row["nAmE"]
|
|
assert row[1] == row["age"]
|
|
assert row[1] == row["AgE"]
|
|
|
|
con.close()
|