def reference_factory_registrations():
    """Load reference factory registrations from JSON file"""
    if not REFERENCE_FILE.exists():
        pytest.fail(
            f"Reference file {REFERENCE_FILE} not found. Run export_factory_registrations.py first."
        )

    with REFERENCE_FILE.open("r") as f:
        return json.load(f)
Load reference factory registrations from JSON file
spacy/tests/test_factory_registrations.py