mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-14 09:23:09 +00:00
refactor(test): tax rule; removed setUpClass, tearDownClass
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user