Exemple #1
0
 def test_area_name_2m(self):
     a = quantity.Area(2, "2m")
     self.assertNotEquals(str(a), '2.0 m\u00B2')
Exemple #2
0
 def test_area_name_m2(self):
     a = quantity.Area(2, "m2")
     self.assertEquals(str(a), '2.0 m\u00B2')
Exemple #3
0
 def test_convert_area_from_m2_to_are(self):
     a = quantity.Area(200, 'm2')
     self.assertAlmostEqual(a('are'), float('2'), delta=1e-3)
Exemple #4
0
 def test_convert_area_from_acre_to_are(self):
     a = quantity.Area(1, 'ac')
     self.assertAlmostEqual(a('are'), float('40.4684'), delta=1e-3)
Exemple #5
0
 def test_convert_area_from_inch2_to_yd2(self):
     a = quantity.Area(2.33, 'in2')
     self.assertAlmostEqual(a('yd2'), float('0.00179783951'), delta=1e-3)