Mercurial > hg > nsaunier > traffic-intelligence
comparison python/tests/storage.txt @ 614:5e09583275a4
Merged Nicolas/trafficintelligence into default
| author | Mohamed Gomaa <eng.m.gom3a@gmail.com> |
|---|---|
| date | Fri, 05 Dec 2014 12:13:53 -0500 |
| parents | 36605d843be5 |
| children | ef6dd60be2e1 |
comparison
equal
deleted
inserted
replaced
| 598:11f96bd08552 | 614:5e09583275a4 |
|---|---|
| 1 >>> from storage import * | 1 >>> from storage import * |
| 2 >>> from StringIO import StringIO | |
| 2 | 3 |
| 3 >>> loadPrototypeMatchIndexesFromSqlite("nonexistent") | 4 >>> f = openCheck('non_existant_file.txt') |
| 5 File non_existant_file.txt could not be opened. | |
| 6 | |
| 7 >>> nonexistentFilename = "nonexistent" | |
| 8 >>> loadPrototypeMatchIndexesFromSqlite(nonexistentFilename) | |
| 4 DB Error: no such table: prototypes | 9 DB Error: no such table: prototypes |
| 5 [] | 10 [] |
| 6 >>> loadTrajectoriesFromSqlite("nonexistent", 'feature') | 11 >>> loadTrajectoriesFromSqlite(nonexistentFilename, 'feature') |
| 7 DB Error: no such table: positions | 12 DB Error: no such table: positions |
| 8 DB Error: no such table: velocities | 13 DB Error: no such table: velocities |
| 9 [] | 14 [] |
| 15 >>> from os import remove | |
| 16 >>> remove(nonexistentFilename) | |
| 17 | |
| 18 >>> strio = StringIO('# asdlfjasdlkj0\nsadlkfjsdlakjf') | |
| 19 >>> readline(strio) | |
| 20 'sadlkfjsdlakjf' | |
| 21 >>> strio = StringIO('# asdlfjasdlkj0\nsadlkfjsdlakjf') | |
| 22 >>> readline(strio, ['#']) | |
| 23 'sadlkfjsdlakjf' | |
| 24 >>> strio = StringIO('# asdlfjasdlkj0\nsadlkfjsdlakjf') | |
| 25 >>> readline(strio, ['%']) | |
| 26 '# asdlfjasdlkj0' | |
| 27 >>> strio = StringIO('# asdlfjasdlkj0\nsadlkfjsdlakjf') | |
| 28 >>> readline(strio, '%*$') | |
| 29 '# asdlfjasdlkj0' | |
| 30 >>> readline(strio, '%#') | |
| 31 'sadlkfjsdlakjf' |
