コード例 #1
0
ファイル: test_checks.py プロジェクト: vdestraitt/engarde
def test_none_missing_raises():
    df = pd.DataFrame(np.random.randn(5, 3))
    df.iloc[0, 0] = np.nan
    with pytest.raises(AssertionError):
        ck.none_missing(df)

    with pytest.raises(AssertionError):
        dc.none_missing()(_add_n)(df, n=2)
コード例 #2
0
ファイル: test_checks.py プロジェクト: ericmjl/engarde
def test_none_missing_raises():
    df = pd.DataFrame(np.random.randn(5, 3))
    df.iloc[0, 0] = np.nan
    with pytest.raises(AssertionError):
        ck.none_missing(df)

    with pytest.raises(AssertionError):
        dc.none_missing()(_add_n)(df, n=2)
コード例 #3
0
ファイル: test_checks.py プロジェクト: vdestraitt/engarde
def test_none_missing():
    df = pd.DataFrame(np.random.randn(5, 3))
    result = ck.none_missing(df)
    tm.assert_frame_equal(df, result)

    result = dc.none_missing()(_add_n)(df, 2)
    tm.assert_frame_equal(result, df + 2)
    result = dc.none_missing()(_add_n)(df, n=2)
    tm.assert_frame_equal(result, df + 2)
コード例 #4
0
ファイル: test_checks.py プロジェクト: ericmjl/engarde
def test_none_missing():
    df = pd.DataFrame(np.random.randn(5, 3))
    result = ck.none_missing(df)
    tm.assert_frame_equal(df, result)

    result = dc.none_missing()(_add_n)(df, 2)
    tm.assert_frame_equal(result, df + 2)
    result = dc.none_missing()(_add_n)(df, n=2)
    tm.assert_frame_equal(result, df + 2)