def test_validate_dtype_bad_str_df():
    # checks that TypeError is raised when df contains object (str) data
    with pytest.raises(TypeError) as excinfo:
        bf._validate_binary_dtype(bad_type1)
    # verifies TypeError contains appropriate message
    assert 'should be of type bool or int64' in str(excinfo.value)
def test_validate_dtype_bad_float_ser():
    # checks that TypeError is raised when series contains float data
    with pytest.raises(TypeError) as excinfo:
        bf._validate_binary_dtype(bad_type2['b1'])
    # verifies TypeError contains appropriate message
    assert 'should be of type bool or int64' in str(excinfo.value)
def test_validate_dtype_good_ser():
    # verifies good data passes the dtype check
    bf._validate_binary_dtype(good['g1'])