def test_calculate_next_position(self): ''' Tests the calculate_next_position method of Calculator class. ''' alpha = 0.05 test_map = 20.0 self.assertEqual(1, \ Calculator.calculate_next_position(1.0, 9.0, \ test_map, alpha, 2.0)) self.assertAlmostEqual(1.08333, \ Calculator.calculate_next_position(1.0, 4.0, \ test_map, alpha, 2.0), \ places=5) # testing the torus points 2 and 19 self.assertAlmostEqual(1.916666, \ Calculator.calculate_next_position(2.0, 19.0, \ test_map, alpha, 2.0), \ places=5)