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

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

#countcontent
1n/aimport sqlite3
2n/a
3n/acon = sqlite3.connect("mydb")
4n/a
5n/acur = con.cursor()
6n/a
7n/anewPeople = (
8n/a ('Lebed' , 53),
9n/a ('Zhirinovsky' , 57),
10n/a )
11n/a
12n/afor person in newPeople:
13n/a cur.execute("insert into people (name_last, age) values (?, ?)", person)
14n/a
15n/a# The changes will not be saved unless the transaction is committed explicitly:
16n/acon.commit()