Testing access in different units
(self)
| 43 | D(ha=100) |
| 44 | |
| 45 | def test_access(self): |
| 46 | "Testing access in different units" |
| 47 | d = D(m=100) |
| 48 | self.assertEqual(d.km, 0.1) |
| 49 | self.assertAlmostEqual(d.ft, 328.084, 3) |
| 50 | |
| 51 | def test_access_invalid(self): |
| 52 | "Testing access in invalid units" |