Exemplo n.º 1
0
def test_determine_key_type(key, dtype):
    assert _determine_key_type(key) == dtype
Exemplo n.º 2
0
def test_determine_key_type_error():
    with pytest.raises(ValueError, match="No valid specification of the"):
        _determine_key_type(1.0)
Exemplo n.º 3
0
def test_determine_key_type_slice_error():
    with pytest.raises(TypeError, match="Only array-like or scalar are"):
        _determine_key_type(slice(0, 2, 1), accept_slice=False)