Esempio n. 1
0
    def _generator(self):
        ''' A generator returning a dictionary created from the parsed page data. '''

        for name, coordinates, description in zip(self._names, self._coordinates, self._descriptions):
            yield {
                'name': name.strip(),
                'coordinates': StaticCoordinate.match(coordinates),
                'description': description.strip()
            }
Esempio n. 2
0
 def test_partial_coordinates_dont_match(self):
     self.assertIsNone(StaticCoordinate.match('N 47° 03.204'))
     self.assertIsNone(StaticCoordinate.match('E 008° 18.557'))
Esempio n. 3
0
 def test_coordinates_in_wgs84_with_floating_point_minutes(self):
     self.assertEquals(StaticCoordinate.match('\n                N 47° 03.204 E 008° 18.557\xa0\n\n            '),
                       'N 47° 03.204 E 008° 18.557')
Esempio n. 4
0
 def test_non_coordinates_yield_empty(self):
     self.assertIsNone(StaticCoordinate.match('\n                ???\xa0\n\n            '))