def test_condition4i(): sheet = Sheet("test", *three_faces_sheet()) assert len(condition_4i(sheet)) == 0 sheet.edge_df = sheet.edge_df.append(sheet.edge_df.iloc[-1], ignore_index=True) sheet.edge_df.index.name = "edge" sheet.reset_index() sheet.reset_topo() assert len(condition_4i(sheet)) == 1
def test_close_face(): sheet = Sheet("test", *three_faces_sheet()) e0 = sheet.edge_df.index[0] face = sheet.edge_df.loc[e0, "face"] Ne = sheet.Ne sheet.edge_df = sheet.edge_df.loc[sheet.edge_df.index[1:]].copy() close_face(sheet, face) assert sheet.Ne == Ne close_face(sheet, face) assert sheet.Ne == Ne