예제 #1
0
파일: record.py 프로젝트: oowowaee/coldcase
 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)