Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions rct229/utils/std_comparisons_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
)

_M2 = ureg("m2")
_TONS = ureg("tons")


def test__std_equal__true_with_units():
Expand Down Expand Up @@ -194,6 +195,10 @@ def test__std_equal_with_precision__10_false_without_units():
assert not std_equal_with_precision(155, 150, 10)


def test__std_equal_with_precision__1_true_with_units():
assert std_equal_with_precision(19.47 * _TONS, 19.52 * _TONS, 1 * _TONS)


def test__std_conservative_outcome__true_with_units_gt():
assert std_conservative_outcome(1.1 * _M2, 1.05 * _M2, operator.gt)

Expand Down
Loading