from grav_bridge_i.models import TARGET_FORBIDDEN, feature_registry

def test_model_registry_uses_common_m2_base_and_no_target(config):
    registry = feature_registry(config)
    m2 = set(registry["M2"].all_features)
    assert m2 <= set(registry["M_I"].all_features)
    assert m2 <= set(registry["M_P"].all_features)
    assert m2 <= set(registry["M_IP"].all_features)
    for spec in registry.values():
        assert not (TARGET_FORBIDDEN & set(spec.all_features))
