Skip to content

Commit dc82e19

Browse files
committed
updated calibration parameters, but still tests do not pass well
1 parent 7001a08 commit dc82e19

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

src/openptv_python/parameters.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,10 @@ def set_max_discontinuity(self, value: int) -> None:
843843
"""Set the maximum discontinuity."""
844844
self.discont = value
845845

846+
def get_max_discontinuity(self):
847+
"""Return the maximum discontinuity."""
848+
return self.discont
849+
846850

847851
def read_target_par(filename: Path) -> TargetPar:
848852
"""Read target parameters from file and returns target_par object."""

tests/pyptv/test_populate_parameters.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,17 @@ class TestCalibrationReadWrite:
605605
@property
606606
def test_cal_dir(self):
607607
"""Path to test calibration files."""
608-
return Path(__file__).parent.parent / "working_folder" / "test_cavity" / "cal"
608+
base_dir = Path(__file__).parent.parent
609+
candidates = [
610+
base_dir / "testing_folder" / "test_cavity" / "cal",
611+
base_dir / "working_folder" / "test_cavity" / "cal",
612+
]
613+
614+
for candidate in candidates:
615+
if candidate.exists():
616+
return candidate
617+
618+
return candidates[0]
609619

610620
def setUp(self):
611621
"""Set up test fixtures - called before each test method."""

0 commit comments

Comments
 (0)