Skip to content

Commit 7bfe2b8

Browse files
committed
ENH: update for new example scheme
1 parent 1352315 commit 7bfe2b8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

libpysal/weights/tests/test_util.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@
1616
except:
1717
HAS_GEOPANDAS = False
1818

19+
1920
class Testutil(unittest.TestCase):
2021
def setUp(self):
2122
self.w = Rook.from_shapefile(
2223
examples.get_path('10740.shp'))
2324

25+
self.rio = examples.load_example('Rio Grande do Sul')
26+
2427
def test_lat2W(self):
2528
w9 = lat2W(3, 3)
2629
self.assertEqual(w9.pct_nonzero, 29.62962962962963)
@@ -95,7 +98,7 @@ def test_higher_order(self):
9598
w5_2 = util.higher_order(w5, 2)
9699
w5_20 = {2: 1.0, 10: 1.0, 6: 1.0}
97100
self.assertEqual(w5_20, w5_2[0])
98-
101+
99102
def test_higher_order_classes(self):
100103
wdb = DistanceBand.from_shapefile(examples.get_path('baltim.shp'), 34)
101104
wknn = KNN.from_shapefile(examples.get_path('baltim.shp'), 10)
@@ -199,7 +202,7 @@ def test_get_ids_gdf(self):
199202
polyids = util.get_ids(gdf, "POLYID")
200203
polyids5 = [1, 2, 3, 4, 5]
201204
self.assertEqual(polyids5, polyids[:5])
202-
205+
203206
def test_get_points_array_from_shapefile(self):
204207
xy = util.get_points_array_from_shapefile(
205208
examples.get_path('juvenile.shp'))

0 commit comments

Comments
 (0)