fix(testing): tolerate missing app.tests module (#28456)
This commit is contained in:
parent
fa3fe0e75e
commit
aa41cbad76
1 changed files with 9 additions and 6 deletions
|
|
@ -103,9 +103,12 @@ class IntegrationTestPreparation:
|
|||
@debug_timer
|
||||
def _create_global_test_record_dependencies(app: str, category: str):
|
||||
"""Create global test record dependencies"""
|
||||
test_module = frappe.get_module(f"{app}.tests")
|
||||
if hasattr(test_module, "global_test_dependencies"):
|
||||
logger.info(f"Creating global test record dependencies for {category} tests on {app} ...")
|
||||
for doctype in test_module.global_test_dependencies:
|
||||
logger.debug(f"Creating global test records for {doctype}")
|
||||
make_test_records(doctype, commit=True)
|
||||
try:
|
||||
test_module = frappe.get_module(f"{app}.tests")
|
||||
if hasattr(test_module, "global_test_dependencies"):
|
||||
logger.info(f"Creating global test record dependencies for {category} tests on {app} ...")
|
||||
for doctype in test_module.global_test_dependencies:
|
||||
logger.debug(f"Creating global test records for {doctype}")
|
||||
make_test_records(doctype, commit=True)
|
||||
except ModuleNotFoundError:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue