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.
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
):
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)