Esempio n. 1
0
 def test_5(self):
     self.assertEqual(si_units.string_number_with_unit_to_value(5), 5)
     self.assertEqual(si_units.string_number_with_unit_to_value(5.), 5.)
Esempio n. 2
0
 def test_3(self):
     sol = si_units.string_number_with_unit_to_value("13")
     self.assertAllclose(sol, hfarray(13, unit=None))
     self.assertEqual(sol.unit, None)
Esempio n. 3
0
 def test_1(self):
     sol = si_units.string_number_with_unit_to_value("1.2e2 V")
     self.assertAllclose(sol, hfarray(1.2e2, unit="V"))
     self.assertEqual(sol.unit, "V")
Esempio n. 4
0
 def test_5(self):
     self.assertEqual(si_units.string_number_with_unit_to_value(5), 5)
     self.assertEqual(si_units.string_number_with_unit_to_value(5.), 5.)
Esempio n. 5
0
 def test_3(self):
     sol = si_units.string_number_with_unit_to_value("13")
     self.assertAllclose(sol, hfarray(13, unit=None))
     self.assertEqual(sol.unit, None)
Esempio n. 6
0
 def test_1(self):
     sol = si_units.string_number_with_unit_to_value("1.2e2 V")
     self.assertAllclose(sol, hfarray(1.2e2, unit="V"))
     self.assertEqual(sol.unit, "V")