mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
test: improve test case
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import frappe
|
import frappe
|
||||||
|
from frappe.utils import flt
|
||||||
|
|
||||||
from erpnext.tests.utils import ERPNextTestSuite, change_settings
|
from erpnext.tests.utils import ERPNextTestSuite, change_settings
|
||||||
|
|
||||||
@@ -255,9 +256,8 @@ class TestTaxesAndTotals(ERPNextTestSuite):
|
|||||||
|
|
||||||
# item 1: taxable=100, tax=9.0; item 2: taxable=57, tax=5.13; item 3: taxable=1000, tax=90.0
|
# item 1: taxable=100, tax=9.0; item 2: taxable=57, tax=5.13; item 3: taxable=1000, tax=90.0
|
||||||
# error diffusion: 14.13 - 9.0 = 5.130000000000001 without rounding
|
# error diffusion: 14.13 - 9.0 = 5.130000000000001 without rounding
|
||||||
# 3rd item ensures the artifact is on a middle row (not corrected by last-row adjustment)
|
|
||||||
for detail in doc.item_wise_tax_details:
|
for detail in doc.item_wise_tax_details:
|
||||||
self.assertEqual(detail.amount, round(detail.amount, 2))
|
self.assertEqual(detail.amount, flt(detail.amount, detail.precision("amount")))
|
||||||
|
|
||||||
def test_item_wise_tax_detail_with_multi_currency_with_single_item(self):
|
def test_item_wise_tax_detail_with_multi_currency_with_single_item(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user