def test_registry_entries(reference_registry):
    """Test that all registry entries are present"""
    # Check each registry's entries
    for registry_name, expected_entries in reference_registry.items():
        # Skip if this registry type doesn't exist
        if not hasattr(registry, registry_name):
            pytest.fail(f"Registry '{registry_name}' does not exist.")

        # Get current entries
        reg = getattr(registry, registry_name)
        current_entries = sorted(list(reg.get_all().keys()))

        # Compare entries
        expected_set = set(expected_entries)
        current_set = set(current_entries)

        # Check for missing entries - these would indicate our new registry population
        # mechanism is missing something
        missing_entries = expected_set - current_set
        assert (
            not missing_entries
        ), f"Registry '{registry_name}' missing entries: {', '.join(missing_entries)}"
Test that all registry entries are present
spacy/tests/test_registry_population.py