Mercurial > getan
comparison test_data/getan_test_data.py @ 450:45b7b83efaed
Prepares for release 2.2.
author | Magnus Schieder <mschieder@intevation.de> |
---|---|
date | Fri, 26 Jan 2018 13:15:34 +0100 |
parents | 7125e67d5acb |
children | ab3c63877862 |
comparison
equal
deleted
inserted
replaced
449:50b00768575e | 450:45b7b83efaed |
---|---|
1 #!/usr/bin/env python3 | 1 #!/usr/bin/env python3 |
2 # | 2 |
3 # Author: Magnus Schieder <magnus.schieder@intevation.de> | |
4 # (c) 2018 Intevation GmbH | |
5 # | |
6 # Program to create test data for getan (getan_test_data.db). | 3 # Program to create test data for getan (getan_test_data.db). |
7 # Please delete existing getan_test_data.db. | 4 |
8 # Open getan with getan_test_data.db: getan /path/getan_test_data.db | 5 """ |
9 # | 6 Author: Magnus Schieder <magnus.schieder@intevation.de> |
10 # This is Free Software licensed under the terms of GPLv3 or later. | 7 (c) 2018 Intevation GmbH |
11 # For details see LICENSE coming with the source of 'getan'. | 8 |
12 # | 9 Please delete existing getan_test_data.db. |
10 Execute getan_test_data.py to get the test database getan_test_data.db. | |
11 Open getan with getan_test_data.db: getan /path/getan_test_data.db | |
12 | |
13 This is Free Software licensed under the terms of GPLv3 or later. | |
14 For details see LICENSE coming with the source of 'getan'. | |
15 """ | |
13 | 16 |
14 | 17 |
15 import sqlite3 | 18 import sqlite3 |
16 | 19 |
17 | 20 |
66 db.executemany('''INSERT INTO entries(project_id, start_time, stop_time, | 69 db.executemany('''INSERT INTO entries(project_id, start_time, stop_time, |
67 description) VALUES (?,?,?,?)''', ent) | 70 description) VALUES (?,?,?,?)''', ent) |
68 | 71 |
69 conn.commit() | 72 conn.commit() |
70 conn.close() | 73 conn.close() |
74 print("getan_test_data.db was created.") | |
71 | 75 |
72 if __name__ == '__main__': | 76 if __name__ == '__main__': |
73 main() | 77 main() |