seitime-frappe/frappe/tests/utils
barredterra 38e140df22 fix(tests): skip uninstalled doctypes in test record dependency walk
The test runner walks link-field dependencies recursively to pre-generate
test records via `get_missing_records_doctypes`. If any DocType in the
transitive link graph belonged to an app not installed on the test site,
the walk crashed with `DoesNotExistError`, aborting the entire suite
before a single test ran.

Treat such link targets as dead-end leaves instead:

- `get_modules` now returns `(None, None)` when the DocType row does not
  exist, instead of falling through into `load_doctype_module` which
  raises.
- `get_missing_records_doctypes` checks for `module is None`, logs a
  warning naming the parent DocType that linked to it, and returns
  without descending further.

This restores the ability to run downstream test suites that link
(directly or transitively) to optional/uninstalled apps without forcing
every CI environment to know the full transitive link graph.

Fixes #38747
2026-04-21 01:49:08 +02:00
..
__init__.py fix: allow whitelist_for_tests in CI environment 2025-11-21 17:03:50 +05:30
generators.py fix(tests): skip uninstalled doctypes in test record dependency walk 2026-04-21 01:49:08 +02:00