Exemplo n.º 1
0
 def test_m3(self):
     """
     Test the creation of an volume quantity with units of m^3.
     """
     q = quantity.Volume(1.0, "m^3")
     self.assertAlmostEqual(q.value, 1.0, 6)
     self.assertAlmostEqual(q.value_si, 1.0, delta=1e-6)
     self.assertEqual(q.units, "m^3")
Exemplo n.º 2
0
 def test_L(self):
     """
     Test the creation of an volume quantity with units of L.
     """
     q = quantity.Volume(1.0, "L")
     self.assertAlmostEqual(q.value, 1.0, 6)
     self.assertAlmostEqual(q.value_si, 1.0e-3, delta=1e-9)
     self.assertEqual(q.units, "L")
Exemplo n.º 3
0
 def setPolarizability(self, value):
     self._polarizability = quantity.Volume(value)