From ef8c59b3cec7131184699bc4b231714cc803c98d Mon Sep 17 00:00:00 2001 From: simbilod Date: Sun, 3 Nov 2024 14:48:35 -0800 Subject: [PATCH] improve compare --- meshwell/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meshwell/utils.py b/meshwell/utils.py index fd9ba35..e6bccdd 100644 --- a/meshwell/utils.py +++ b/meshwell/utils.py @@ -3,9 +3,11 @@ from meshwell.config import PATH -def compare_meshes(meshfile: Path): +def compare_meshes(meshfile: Path, meshfile2: Path | None = None): meshfile1 = meshfile - meshfile2 = PATH.references / (str(meshfile.with_suffix("")) + ".reference.msh") + meshfile2 = meshfile2 or PATH.references / ( + str(meshfile.with_suffix("")) + ".reference.msh" + ) with open(str(meshfile1)) as f: expected_lines = f.readlines()