def test_cut_xs2(self): df = pd.read_excel(self.f, 'irregular_single') level = 25 # at top xs = df['offset'].values ys = df['Z'].values ns = df['roughness_N'].values df2 = river_tools.cut_xs(xs, ys, ns, level) df2['new_panel'] = 0 df2_check = pd.read_excel(self.f, 'irregular_single_25') np.testing.assert_almost_equal(df2.to_numpy(), df2_check.to_numpy(), 3)
def test_cut_xs8(self): df = pd.read_excel(self.f, 'irregular_multiple') level = 8 # at top xs = df['offset'].values ys = df['Z'].values ns = df['roughness_N'].values df2 = river_tools.cut_xs(xs, ys, ns, level) df2['new_panel'] = 0 # df2.to_csv(r'C:\Users\Mel.Meng\Documents\GitHub\SewerAnalysis\source\test\river\tmp.csv') df2_check = pd.read_excel(self.f, 'irregular_multiple_8') np.testing.assert_almost_equal(df2.to_numpy(), df2_check.to_numpy(), 2)