test: move report tests to subttest (#29945)
Basically failfast=False but for sub-tests
This commit is contained in:
parent
745f7bc5f0
commit
5d403449bd
@ -39,10 +39,11 @@ class TestReports(unittest.TestCase):
|
|||||||
def test_execute_all_accounts_reports(self):
|
def test_execute_all_accounts_reports(self):
|
||||||
"""Test that all script report in stock modules are executable with supported filters"""
|
"""Test that all script report in stock modules are executable with supported filters"""
|
||||||
for report, filter in REPORT_FILTER_TEST_CASES:
|
for report, filter in REPORT_FILTER_TEST_CASES:
|
||||||
execute_script_report(
|
with self.subTest(report=report):
|
||||||
report_name=report,
|
execute_script_report(
|
||||||
module="Accounts",
|
report_name=report,
|
||||||
filters=filter,
|
module="Accounts",
|
||||||
default_filters=DEFAULT_FILTERS,
|
filters=filter,
|
||||||
optional_filters=OPTIONAL_FILTERS if filter.get("_optional") else None,
|
default_filters=DEFAULT_FILTERS,
|
||||||
)
|
optional_filters=OPTIONAL_FILTERS if filter.get("_optional") else None,
|
||||||
|
)
|
||||||
|
@ -55,10 +55,11 @@ class TestManufacturingReports(unittest.TestCase):
|
|||||||
def test_execute_all_manufacturing_reports(self):
|
def test_execute_all_manufacturing_reports(self):
|
||||||
"""Test that all script report in manufacturing modules are executable with supported filters"""
|
"""Test that all script report in manufacturing modules are executable with supported filters"""
|
||||||
for report, filter in REPORT_FILTER_TEST_CASES:
|
for report, filter in REPORT_FILTER_TEST_CASES:
|
||||||
execute_script_report(
|
with self.subTest(report=report):
|
||||||
report_name=report,
|
execute_script_report(
|
||||||
module="Manufacturing",
|
report_name=report,
|
||||||
filters=filter,
|
module="Manufacturing",
|
||||||
default_filters=DEFAULT_FILTERS,
|
filters=filter,
|
||||||
optional_filters=OPTIONAL_FILTERS if filter.get("_optional") else None,
|
default_filters=DEFAULT_FILTERS,
|
||||||
)
|
optional_filters=OPTIONAL_FILTERS if filter.get("_optional") else None,
|
||||||
|
)
|
||||||
|
@ -73,10 +73,11 @@ class TestReports(unittest.TestCase):
|
|||||||
def test_execute_all_stock_reports(self):
|
def test_execute_all_stock_reports(self):
|
||||||
"""Test that all script report in stock modules are executable with supported filters"""
|
"""Test that all script report in stock modules are executable with supported filters"""
|
||||||
for report, filter in REPORT_FILTER_TEST_CASES:
|
for report, filter in REPORT_FILTER_TEST_CASES:
|
||||||
execute_script_report(
|
with self.subTest(report=report):
|
||||||
report_name=report,
|
execute_script_report(
|
||||||
module="Stock",
|
report_name=report,
|
||||||
filters=filter,
|
module="Stock",
|
||||||
default_filters=DEFAULT_FILTERS,
|
filters=filter,
|
||||||
optional_filters=OPTIONAL_FILTERS if filter.get("_optional") else None,
|
default_filters=DEFAULT_FILTERS,
|
||||||
)
|
optional_filters=OPTIONAL_FILTERS if filter.get("_optional") else None,
|
||||||
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user