refactor(test): tax rule; removed setUpClass, tearDownClass

This commit is contained in:
ruthra kumar
2026-02-17 16:03:25 +05:30
parent aa998219b1
commit cb693e05bf
32 changed files with 60 additions and 184 deletions

View File

@@ -903,18 +903,9 @@ 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")
def setUp(self):
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,

View File

@@ -12,9 +12,7 @@ from erpnext.tests.utils import ERPNextTestSuite
class TestAssetShiftAllocation(ERPNextTestSuite):
@classmethod
def setUpClass(cls):
super().setUpClass()
def setUp(self):
create_asset_shift_factors()
def test_asset_shift_allocation(self):