def test_covariance_manager():
    cm = CovarianceManager('made-up-class', HomoskedasticCovariance,
                           HeteroskedasticCovariance)
    with pytest.raises(ValueError):
        cm['clustered']

    with pytest.raises(KeyError):
        cm['unknown']

    assert cm['unadjusted'] is HomoskedasticCovariance
    assert cm['homoskedastic'] is HomoskedasticCovariance
    assert cm['robust'] is HeteroskedasticCovariance
    assert cm['heteroskedastic'] is HeteroskedasticCovariance
def test_covariance_manager() -> None:
    cm = CovarianceManager("made-up-class", HomoskedasticCovariance,
                           HeteroskedasticCovariance)
    with pytest.raises(ValueError):
        assert cm["clustered"] is not None

    with pytest.raises(KeyError):
        assert cm["unknown"] is not None

    assert cm["unadjusted"] is HomoskedasticCovariance
    assert cm["homoskedastic"] is HomoskedasticCovariance
    assert cm["robust"] is HeteroskedasticCovariance
    assert cm["heteroskedastic"] is HeteroskedasticCovariance