
self = <test_exit_consult_port_load_providers.TestFailLoudOnImportErrors object at 0x11de1d4c0>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x11eeca120>

    def test_register_default_raising_value_error_propagates(self, monkeypatch):
        """A provider's ``register_default()`` that raises a bug-class error (ValueError,
        TypeError, AttributeError) must propagate. The contract is fail-LOUD on programming
        bugs — silent degradation here would mean the dashboard reports a provider exists
        when in fact it could not be registered."""
        import rtrader.services.exit_consult_port as p
        import rtrader.services.exit_consult_trail as trail_mod
    
        def _bad_default():
            raise ValueError("intentional: provider construction refused")
    
        monkeypatch.setattr(trail_mod, "register_default", _bad_default)
>       with pytest.raises(ValueError, match="intentional"):
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       Failed: DID NOT RAISE <class 'ValueError'>

tests/services/test_exit_consult_port_load_providers.py:295: Failed
