ยปCore Development>Code coverage>Doc/includes/sqlite3/rowclass.py

Python code coverage for Doc/includes/sqlite3/rowclass.py

#countcontent
1n/aimport sqlite3
2n/a
3n/acon = sqlite3.connect(":memory:")
4n/acon.row_factory = sqlite3.Row
5n/a
6n/acur = con.cursor()
7n/acur.execute("select 'John' as name, 42 as age")
8n/afor row in cur:
9n/a assert row[0] == row["name"]
10n/a assert row["name"] == row["nAmE"]
11n/a assert row[1] == row["age"]
12n/a assert row[1] == row["AgE"]