test: set up float precision

(cherry picked from commit c0a85faa68)
This commit is contained in:
khushi8112
2026-01-06 23:49:21 +05:30
committed by Mergify
parent 0af4cd9098
commit b000224a93

View File

@@ -826,6 +826,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,