diff --git a/autotest/test_prt_dry.py b/autotest/test_prt_dry.py index 5b419a7f110..1f42b0f9eb2 100644 --- a/autotest/test_prt_dry.py +++ b/autotest/test_prt_dry.py @@ -372,9 +372,14 @@ def check_output(idx, test, snapshot): pls = pd.read_csv(trackcsv_path) strtpts = pls[pls.ireason == 0] - assert snapshot == pls.drop(["name", "icell"], axis=1).round(2).to_records( - index=False - ) + actual = pls.drop(["name", "icell"], axis=1).round(2).reset_index(drop=True) + try: + assert snapshot == actual.to_records(index=False) + except: + snapshot_path = next(iter(k for k in snapshot.session._extensions if name in k)) + expected = pd.DataFrame(np.load(snapshot_path)).reset_index(drop=True) + diff = expected.compare(actual) + pytest.fail(diff.to_json()) plot_head = False if plot_head: diff --git a/autotest/test_prt_voronoi1.py b/autotest/test_prt_voronoi1.py index b56a22012b0..7936a94d23c 100644 --- a/autotest/test_prt_voronoi1.py +++ b/autotest/test_prt_voronoi1.py @@ -28,6 +28,8 @@ from prt_test_utils import get_model_name from shapely.geometry import LineString, Point +# snapshot_path = Path(__file__).parent / "__snapshots__" / __name__ / "test_mf6model" + simname = "prtvor1" cases = [f"{simname}l2r", f"{simname}welp", f"{simname}weli"] times = [True, False, False] @@ -371,7 +373,16 @@ def check_output(idx, test, snapshot): # have moved vertically. round for cross-platform error. # skip macos-14 in CI because grid is slightly different if not (is_in_ci() and system() == "Darwin" and processor() == "arm"): - assert snapshot == endpts.drop("name", axis=1).round(1).to_records(index=False) + actual = endpts.drop("name", axis=1).round(1).reset_index(drop=True) + try: + assert snapshot == actual.to_records(index=False) + except: + snapshot_path = next( + iter(k for k in snapshot.session._extensions if name in k) + ) + expected = pd.DataFrame(np.load(snapshot_path)).reset_index(drop=True) + diff = expected.compare(actual) + pytest.fail(diff.to_json()) # plot results if enabled plot = False