Fix the radius, it was half the size it should have been in each direction
[ottawa-travel-planner.git] / tests / test_stopmashupleech_regexes.py
bloba1fff0a5be9f4ea972301d82e956fceaea154c41
1 # vi: set fileencoding=latin1 softtabstop=4 shiftwidth=4 tabstop=8 expandtab:
3 # The above line tells Python to use Latin-1, which seems to be right for the
4 # accented characters coming back from the travel planner.
6 import unittest
7 import stopMashupLeech
9 class TestAddrRegex(unittest.TestCase):
10 def testRiverside2865(self):
11 text = "RIVERSIDE / AD. 2865"
12 match = stopMashupLeech._addr_rx.match(text)
13 self.assertNotEquals(match, None)
14 self.assertEquals(match.group("street1"), "RIVERSIDE")
15 self.assertEquals(match.group("number"), "2865")
17 class TestIntersectionRegex(unittest.TestCase):
18 def testBasic(self):
19 text = "BANK / RIVERSIDE"
20 match = stopMashupLeech._intersection_rx.match(text)
21 self.assertNotEquals(match, None)
22 self.assertEquals(match.group("street1"), "BANK")
23 self.assertEquals(match.group("street2"), "RIVERSIDE")
25 class TestStationStopRegex(unittest.TestCase):
26 def testIgnoreStationStop(self):
27 text = r"HERON STOP / ARRÊT 4A"
28 match = stopMashupLeech._station_stop_rx.match(text)
29 self.assertNotEquals(match, None)