I’ve built some unit tests for my custom DocTypes, inside a custom app. Some are associated with ERPNext DocTypes such as Customer, via a Link type field.
Well, the issue is that because I have a Link field type in my doctype, the current test framework automatically inserts test_records.json from the referenced doctype package, when running tests on my doctype. So in other words, the current test framework has inherent side effects, as far as custom apps are concerned.
There doesn’t appear to be a way around this, unless I remove the link field type from my custom doctype in my custom module.