def test_filter(self): df = iotools.loadBoundaryFromShapefile( self.shapefile, filterfxn=lambda r: r['properties']['reach'] == self.test_reach ) nt.assert_equal(df.shape[0], self.known_points_in_testreach)
def test_nofilter(self): df = iotools.loadBoundaryFromShapefile(self.shapefile) nt.assert_true(isinstance(df, pandas.DataFrame)) nt.assert_list_equal(df.columns.tolist(), self.known_df_columns) nt.assert_equal(df.shape[0], self.known_points_in_boundary)