def test_margins(self): lines = list(DictReader(kALASKA)) self.assertAlmostEqual(10.0, district_margins(lines)[0])