def test_toolbox_metal_set_decimal_precision(self): """ Test functionality of set_decimal_precision in toolbox_metal.py. """ self.assertEqual(math_and_overrides.decimal_precision, 10) math_and_overrides.set_decimal_precision(15) self.assertEqual(math_and_overrides.decimal_precision, 15)
def test_toolbox_metal_cross(self): """ Test functionality of cross in toolbox_metal.py. """ math_and_overrides.set_decimal_precision(3) my_array_1 = np.array([3, 4]) my_array_2 = np.array([12, 14]) self.assertEqual(math_and_overrides.cross(my_array_1, my_array_2), -6)
def tearDown(self): """Tie any loose ends.""" math_and_overrides.set_decimal_precision(10)
def test_toolbox_metal_round(self): """Test functionality of round in toolbox_metal.py.""" math_and_overrides.set_decimal_precision(2) self.assertEqual(math_and_overrides.round(12.349), 12.35)