Esempio n. 1
0
 def test_count_velocity(self):
     particle = Particle(0, 0, 0, 0)
     particle.compute_velocity([1, 2, 3, 4])
     self.assertEqual(4, len(particle.velocity))
Esempio n. 2
0
 def test_count_similarity_same_object(self):
     particle = Particle(0, 0, 0, 0)
     print(particle.count_difference_measure(self.refimage, self.refimage))
Esempio n. 3
0
 def test_move(self):
     particle = Particle(0, 0, 0, 0)
     particle.velocity = [1, 1, 1, 1]
     particle.move()
     self.assertEqual([1, 1, 1, 1.0], particle.position)
Esempio n. 4
0
 def test_count_similarity(self):
     particle = Particle(55, 47, 1, 90)
     print(particle.count_difference_measure(self.refimage, self.landscape))