Testing comparisons
(self)
| 123 | self.assertEqual(d6._default_unit, "m") |
| 124 | |
| 125 | def test_comparisons(self): |
| 126 | "Testing comparisons" |
| 127 | d1 = D(m=100) |
| 128 | d2 = D(km=1) |
| 129 | d3 = D(km=0) |
| 130 | |
| 131 | self.assertGreater(d2, d1) |
| 132 | self.assertEqual(d1, d1) |
| 133 | self.assertLess(d1, d2) |
| 134 | self.assertFalse(d3) |
| 135 | |
| 136 | def test_units_str(self): |
| 137 | "Testing conversion to strings" |