コード例 #1
0
 def test_state_state_data(self):
     """
     In this test, area_to_get_got is defined as being located inside a
     state and no other boundaries, where the data we are looking for
     is paired with the state's boundary.  Should return State.
     """
     area_to_get_got = GEOSGeometry(
         "MUlTIPOLYGON(((-95.45 36.8, -95.5 36.8," "-95.5 36.9, -95.45 36.9, -95.45 36.8)))"
     )
     self.assertEqual(highest_resolution_for_data(area_to_get_got, "B19058_002E", Census), "State")
コード例 #2
0
 def test_outside_state_and_county(self):
     """
     In this test, area_to_get_got is defined as being located outside both
     a county and a state, where a census table containing the data we are
     looking for is paired with the county and the state. Should
     return None.
     """
     area_to_get_got = GEOSGeometry(
         "MUlTIPOLYGON(((-35.32 36.4, -35.31 36.4," "-35.31 36.45, -35.32 36.45, -35.32 36.4)))"
     )
     self.assertEqual(highest_resolution_for_data(area_to_get_got, "B19058_002E", Census), None)