|
@@ -138,10 +138,15 @@ class DistanceTest(unittest.TestCase):
|
|
|
self.assertEqual(repr(d1), 'Distance(m=100.0)')
|
|
|
self.assertEqual(repr(d2), 'Distance(km=3.5)')
|
|
|
|
|
|
+ def test_furlong(self):
|
|
|
+ d = D(m=201.168)
|
|
|
+ self.assertEqual(d.furlong, 1)
|
|
|
+
|
|
|
def test_unit_att_name(self):
|
|
|
"Testing the `unit_attname` class method"
|
|
|
unit_tuple = [('Yard', 'yd'), ('Nautical Mile', 'nm'), ('German legal metre', 'german_m'),
|
|
|
- ('Indian yard', 'indian_yd'), ('Chain (Sears)', 'chain_sears'), ('Chain', 'chain')]
|
|
|
+ ('Indian yard', 'indian_yd'), ('Chain (Sears)', 'chain_sears'), ('Chain', 'chain'),
|
|
|
+ ('Furrow Long', 'furlong')]
|
|
|
for nm, att in unit_tuple:
|
|
|
with self.subTest(nm=nm):
|
|
|
self.assertEqual(att, D.unit_attname(nm))
|