Python code coverage for Doc/includes/sqlite3/rowclass.py
# | count | content |
---|---|---|
1 | n/a | import sqlite3 |
2 | n/a | |
3 | n/a | con = sqlite3.connect(":memory:") |
4 | n/a | con.row_factory = sqlite3.Row |
5 | n/a | |
6 | n/a | cur = con.cursor() |
7 | n/a | cur.execute("select 'John' as name, 42 as age") |
8 | n/a | for row in cur: |
9 | n/a | assert row[0] == row["name"] |
10 | n/a | assert row["name"] == row["nAmE"] |
11 | n/a | assert row[1] == row["age"] |
12 | n/a | assert row[1] == row["AgE"] |