diff python/tests/moving.txt @ 998:933670761a57

updated code to python 3 (tests pass and scripts run, but non-executed parts of code are probably still not correct)
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Sun, 27 May 2018 23:22:48 -0400
parents f026ce2af637
children d7afc59f6966
line wrap: on
line diff
--- a/python/tests/moving.txt	Fri May 25 18:15:18 2018 -0400
+++ b/python/tests/moving.txt	Sun May 27 23:22:48 2018 -0400
@@ -219,11 +219,11 @@
 >>> computeClearMOT([gt1], [o1], 0.05, 0, 10)
 (None, -1.0, 11, 0, 11, 11, None, None)
 
->>> o1 = MovingObject(1, TimeInterval(0,3), positions = Trajectory([range(4), [0.1, 0.1, 1.1, 1.1]]))
->>> o2 = MovingObject(2, TimeInterval(0,3), positions = Trajectory([range(4), [0.9, 0.9, -0.1, -0.1]]))
->>> gt1 = BBMovingObject(1, TimeInterval(0,3), MovingObject(positions = Trajectory([range(4), [0.]*4])), MovingObject(positions = Trajectory([range(4), [0.]*4])))
+>>> o1 = MovingObject(1, TimeInterval(0,3), positions = Trajectory([list(range(4)), [0.1, 0.1, 1.1, 1.1]]))
+>>> o2 = MovingObject(2, TimeInterval(0,3), positions = Trajectory([list(range(4)), [0.9, 0.9, -0.1, -0.1]]))
+>>> gt1 = BBMovingObject(1, TimeInterval(0,3), MovingObject(positions = Trajectory([list(range(4)), [0.]*4])), MovingObject(positions = Trajectory([list(range(4)), [0.]*4])))
 >>> gt1.computeCentroidTrajectory()
->>> gt2 = BBMovingObject(2, TimeInterval(0,3), MovingObject(positions = Trajectory([range(4), [1.]*4])), MovingObject(positions = Trajectory([range(4), [1.]*4])))
+>>> gt2 = BBMovingObject(2, TimeInterval(0,3), MovingObject(positions = Trajectory([list(range(4)), [1.]*4])), MovingObject(positions = Trajectory([list(range(4)), [1.]*4])))
 >>> gt2.computeCentroidTrajectory()
 >>> computeClearMOT([gt1, gt2], [o1, o2], 0.2, 0, 3) # doctest:+ELLIPSIS
 (0.1..., 0.75, 0, 2, 0, 8, None, None)