Esempio n. 1
0
 def test_not_current_location_at(self):
     location, platform = tfl_tube.location_platform_from_current_location(
         "Not At East Finchley, Platform 1")
     assert (location, platform) == (None, None)
Esempio n. 2
0
 def test_location_not_a_station(self):
     location, platform = tfl_tube.location_platform_from_current_location(
         "At North Acton Junction")
     assert (location, platform) == ("North Acton Junction", None)
Esempio n. 3
0
 def test_at_platform(self):
     location, platform = tfl_tube.location_platform_from_current_location(
         "At Platform")
     assert (location, platform) == ("<current>", "<current>")
Esempio n. 4
0
 def test_location_platform_no_number(self):
     location, platform = tfl_tube.location_platform_from_current_location(
         "At Angel platform")
     assert (location, platform) == ("Angel", None)
Esempio n. 5
0
 def test_location_no_platform(self):
     location, platform = tfl_tube.location_platform_from_current_location(
         "At Mornington Crescent")
     assert (location, platform) == ("Mornington Crescent", None)
Esempio n. 6
0
 def test_location_platform_p_for_platform(self):
     location, platform = tfl_tube.location_platform_from_current_location(
         "At Kings Cross P7")
     assert (location, platform) == ("Kings Cross", "7")
Esempio n. 7
0
 def test_location_platform_typo_plaform(self):
     location, platform = tfl_tube.location_platform_from_current_location(
         "At London Bridge Plaform 1")
     assert (location, platform) == ("London Bridge", "1")
Esempio n. 8
0
 def test_location_platform_comma(self):
     location, platform = tfl_tube.location_platform_from_current_location(
         "At East Finchley, Platform 1")
     assert (location, platform) == ("East Finchley", "1")
Esempio n. 9
0
 def test_location_platform_two_digit_platform(self):
     location, platform = tfl_tube.location_platform_from_current_location(
         "At Baker Street Platform 10")
     assert (location, platform) == ("Baker Street", "10")
Esempio n. 10
0
 def test_location_platform(self):
     location, platform = tfl_tube.location_platform_from_current_location(
         "At Arsenal Platform 2")
     assert (location, platform) == ("Arsenal", "2")