|
16 | 16 | except: |
17 | 17 | HAS_GEOPANDAS = False |
18 | 18 |
|
| 19 | + |
19 | 20 | class Testutil(unittest.TestCase): |
20 | 21 | def setUp(self): |
21 | 22 | self.w = Rook.from_shapefile( |
22 | 23 | examples.get_path('10740.shp')) |
23 | 24 |
|
| 25 | + self.rio = examples.load_example('Rio Grande do Sul') |
| 26 | + |
24 | 27 | def test_lat2W(self): |
25 | 28 | w9 = lat2W(3, 3) |
26 | 29 | self.assertEqual(w9.pct_nonzero, 29.62962962962963) |
@@ -95,7 +98,7 @@ def test_higher_order(self): |
95 | 98 | w5_2 = util.higher_order(w5, 2) |
96 | 99 | w5_20 = {2: 1.0, 10: 1.0, 6: 1.0} |
97 | 100 | self.assertEqual(w5_20, w5_2[0]) |
98 | | - |
| 101 | + |
99 | 102 | def test_higher_order_classes(self): |
100 | 103 | wdb = DistanceBand.from_shapefile(examples.get_path('baltim.shp'), 34) |
101 | 104 | wknn = KNN.from_shapefile(examples.get_path('baltim.shp'), 10) |
@@ -199,7 +202,7 @@ def test_get_ids_gdf(self): |
199 | 202 | polyids = util.get_ids(gdf, "POLYID") |
200 | 203 | polyids5 = [1, 2, 3, 4, 5] |
201 | 204 | self.assertEqual(polyids5, polyids[:5]) |
202 | | - |
| 205 | + |
203 | 206 | def test_get_points_array_from_shapefile(self): |
204 | 207 | xy = util.get_points_array_from_shapefile( |
205 | 208 | examples.get_path('juvenile.shp')) |
|
0 commit comments