diff trafficintelligence/tests/moving.txt @ 1041:fc7c0f38e8a6

added nObjects to MovingObject, with loading/saving
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 04 Jul 2018 16:06:23 -0400
parents aafbc0bab925
children cbc026dacf0b
line wrap: on
line diff
--- a/trafficintelligence/tests/moving.txt	Wed Jul 04 15:37:04 2018 -0400
+++ b/trafficintelligence/tests/moving.txt	Wed Jul 04 16:06:23 2018 -0400
@@ -180,6 +180,11 @@
 True
 
 >>> o1 = MovingObject.generate(1, Point(-5.,0.), Point(1.,0.), TimeInterval(0,10))
+>>> o1.getNObjects() is None
+True
+>>> o1.setNObjects(1.1)
+>>> o1.setNObjects(0.5)
+Number of objects represented by object 1 must be greater or equal to 1 (0.5)
 >>> o2 = MovingObject.generate(2, Point(0.,-5.), Point(0.,1.), TimeInterval(0,10))
 >>> MovingObject.computePET(o1, o2, 0.1)
 (0.0, 5, 5)