Пример #1
0
 def location(self):
     return AddressFinder.find_addresses(self.description)
Пример #2
0
 def test_finds_proximity_address(self):
   str = '168th St. E. near the intersection with B St. E. in Spanaway.'
   self.assertEqual(AddressFinder.find_addresses(str), '168th St. E. near the intersection with B St. E.')
Пример #3
0
 def test_ignores_irrelevant_numbers(self):
   str = '38-year-old Jeremy Martin.  At 1:35 a.m. on Tuesday December 5th, 2017, his home located in the 1400 block of S. 37th St.'
   self.assertEqual(AddressFinder.find_addresses(str), '1400 block of S. 37th St.')
Пример #4
0
 def test_tinds_way(self):
   str = 'a motel room in the abandoned Rainier Motel building located in the 9800 block of South Tacoma Way in '
   self.assertEqual(AddressFinder.find_addresses(str), '9800 block of South Tacoma Way')
Пример #5
0
 def test_finds_bridge(self):
   str = 'seen alive on Thursday March 31st, 2005.  Mason’s vehicle was found a week later on April 6th, 2005, in the City of Tacoma.  On October 23rd, 2005, the remains of Michelle Mason were found in blackberry bushes below the 34th St. Bridge.'
   self.assertEqual(AddressFinder.find_addresses(str), '34th St. Bridge')
Пример #6
0
 def test_finds_roadway(self):
   str = 'police responded to an emergency call in the area of Lake Shore Boulevard E and Don Roadway'
   self.assertEqual(AddressFinder.find_addresses(str), 'Lake Shore Boulevard E and Don Roadway')
Пример #7
0
 def test_finds_named_road(self):
   str = 'Wincott Drive and The Westway'
   self.assertEqual(AddressFinder.find_addresses(str), str)
Пример #8
0
 def test_ignores_911_calls(self):
   str = '911 call at 30 Titan Road'
   self.assertEqual(AddressFinder.find_addresses(str), '30 Titan Road')
Пример #9
0
 def test_ignores_punctuation(self):
   str = '4:05 a.m., police responded to shooting, on Meadowbank Road near Keane Avenue'
   self.assertEqual(AddressFinder.find_addresses(str), 'Meadowbank Road near Keane Avenue')
Пример #10
0
 def test_considers_only_capitals(self):
   str = 'area of Sydenham Street & Creemore Avenue'
   self.assertEqual(AddressFinder.find_addresses(str), 'Sydenham Street & Creemore Avenue')
Пример #11
0
 def test_considers_context(self):
   str = 'frequented the area of Pacific Ave. S. and Portland Ave. in the City of Tacoma.  He was last seen in the area of 38th St. and Pacific Ave.'
   self.assertEqual(AddressFinder.find_addresses(str), '38th St. and Pacific Ave.')
Пример #12
0
 def test_finds_intersections(self):
   str = 'Pacific Ave. S. and Portland Ave.'
   self.assertEqual(AddressFinder.find_addresses(str), str)
Пример #13
0
 def test_finds_address_with_direction(self):
   str = '2100 block of Sunset Drive W.'
   self.assertEqual(AddressFinder.find_addresses(str), str)
Пример #14
0
 def test_finds_address_with_direction_first(self):
   str = '1400 block of S. 37th St.'
   self.assertEqual(AddressFinder.find_addresses(str), str)