Skip to content

Commit 97ef5f5

Browse files
tweak test conditions
1 parent 2bf0e19 commit 97ef5f5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: tests/test_mud_calculator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ def test_compute_mud(tmp_path):
1919

2020
expected_mud = 3
2121
actual_mud = compute_mud(file)
22-
assert actual_mud == pytest.approx(expected_mud, rel=0.1, abs=0.1)
22+
assert actual_mud == pytest.approx(expected_mud, rel=1e-4, abs=0.1)

Diff for: tests/test_tools.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def test_set_mud(user_filesystem):
193193
cli_inputs = ["2.5", "data.xy"]
194194
actual_args = get_args(cli_inputs)
195195
actual_args = set_mud(actual_args)
196-
assert actual_args.mud == pytest.approx(2.5, rel=0.1, abs=0.1)
196+
assert actual_args.mud == pytest.approx(2.5, rel=1e-4, abs=0.1)
197197
assert actual_args.z_scan_file is None
198198

199199
cwd = Path(user_filesystem)
@@ -204,7 +204,7 @@ def test_set_mud(user_filesystem):
204204
cli_inputs = ["2.5", "data.xy"] + inputs
205205
actual_args = get_args(cli_inputs)
206206
actual_args = set_mud(actual_args)
207-
assert actual_args.mud == pytest.approx(expected[0], rel=0.1, abs=0.1)
207+
assert actual_args.mud == pytest.approx(expected[0], rel=1e-4, abs=0.1)
208208
assert actual_args.z_scan_file == expected[1]
209209

210210

0 commit comments

Comments
 (0)