mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-13 14:41:53 +00:00
test: also accept a mid-range rounding loss allowance
This commit is contained in:
@@ -321,8 +321,9 @@ class TestExchangeRateRevaluationValidation(ERPNextTestSuite):
|
||||
for bad in (-0.1, 1, 1.5):
|
||||
doc = self._revaluation_with_rows([], rounding_loss_allowance=bad)
|
||||
self.assertRaises(frappe.ValidationError, doc.validate)
|
||||
# a value inside [0, 1) is accepted
|
||||
self._revaluation_with_rows([], rounding_loss_allowance=0.0).validate()
|
||||
# values inside [0, 1) are accepted, at the lower bound and mid-range
|
||||
for good in (0.0, 0.5):
|
||||
self._revaluation_with_rows([], rounding_loss_allowance=good).validate()
|
||||
|
||||
def test_gain_loss_computed_and_split_by_zero_balance(self):
|
||||
doc = self._revaluation_with_rows(
|
||||
|
||||
Reference in New Issue
Block a user