# HG changeset patch # User Nicolas Saunier # Date 1531166475 14400 # Node ID 093e2b892ede63bc950df7b8337f7f6a401ffb2e # Parent 9e4e80fc5943f346215510878c9340050c3025d0 integrating additions to storage.py diff -r 9e4e80fc5943 -r 093e2b892ede ..hgignore.swp Binary file ..hgignore.swp has changed diff -r 9e4e80fc5943 -r 093e2b892ede trafficintelligence/storage.py --- a/trafficintelligence/storage.py Mon Jul 09 19:51:42 2018 +0000 +++ b/trafficintelligence/storage.py Mon Jul 09 16:01:15 2018 -0400 @@ -1391,7 +1391,6 @@ self.sectionHeader = config.sections()[0] else: self.sectionHeader = 'DEFAULT' - #Tracker parameters self.accelerationBound = config.getint(self.sectionHeader, 'acceleration-bound') @@ -1413,8 +1412,7 @@ self.minFeatureDisplacement = config.getfloat(self.sectionHeader, 'min-feature-displacement') self.updateTimer = config.getint(self.sectionHeader, 'tracker-reload-time') - def loadHomographyConfig(self, filename = None): - + def loadHomographyConfig(self, filename = None): if filename is None: self.homographyFilename = None self.homography = None diff -r 9e4e80fc5943 -r 093e2b892ede trafficintelligence/tests/storage.txt --- a/trafficintelligence/tests/storage.txt Mon Jul 09 19:51:42 2018 +0000 +++ b/trafficintelligence/tests/storage.txt Mon Jul 09 16:01:15 2018 -0400 @@ -1,4 +1,5 @@ >>> from io import StringIO +>>> from os import remove >>> from trafficintelligence.storage import * >>> from trafficintelligence.utils import openCheck, readline >>> from trafficintelligence.moving import MovingObject, Point, TimeInterval, Trajectory, prepareSplines @@ -8,11 +9,7 @@ >>> nonexistentFilename = "nonexistent" >>> loadTrajectoriesFromSqlite(nonexistentFilename, 'feature') -DB Error: no such table: positions -DB Error: no such table: velocities [] ->>> from os import remove ->>> remove(nonexistentFilename) >>> o1 = MovingObject.generate(2, Point(0.,0.), Point(1.,0.), TimeInterval(0,10)) >>> o2 = MovingObject.generate(3, Point(1.,1.), Point(-0.5,-0.2), TimeInterval(0,9))