mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-14 04:15:10 +00:00
test: set up float precision
This commit is contained in:
@@ -700,6 +700,18 @@ class TestAsset(AssetSetup):
|
||||
|
||||
|
||||
class TestDepreciationMethods(AssetSetup):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
|
||||
cls._old_float_precision = frappe.db.get_single_value("System Settings", "float_precision")
|
||||
frappe.db.set_single_value("System Settings", "float_precision", 2)
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
frappe.db.set_single_value("System Settings", "float_precision", cls._old_float_precision)
|
||||
super().tearDownClass()
|
||||
|
||||
def test_schedule_for_straight_line_method(self):
|
||||
asset = create_asset(
|
||||
calculate_depreciation=1,
|
||||
|
||||
Reference in New Issue
Block a user