Пример #1
0
def test_parent():
    df_head = set_gb('data/pristine/NEWGB.csv').head()
    df_fam_head = set_fam(df_head)
    df_alt_head = set_alt(df_fam_head)
    last_alt_head = df_alt_head.ix[5:, :]
    assert 'Zelah' not in last_alt_head
    assert 'Ythsie' not in last_alt_head
Пример #2
0
def test_alt_row():
    # import ipdb; ipdb.set_trace()
    df_head = set_gb('data/pristine/NEWGB.csv').head()
    df_fam_head = set_fam(df_head)
    df_alt_head = set_alt(df_fam_head)
    assert df_alt_head.ix[0, 'name'] == df_fam_head.ix[0, 'name']
    assert math.isnan(df_alt_head.ix[0, 'parent'])
Пример #3
0
def test_alt_has_parent():
    df_head = set_gb('data/pristine/NEWGB.csv').head()
    df_fam_head = set_fam(df_head)
    df_alt_head = set_alt(df_fam_head)
    last_alt_head = df_alt_head.ix[5:, :]
    for index, row in last_alt_head.iterrows():
        assert len(last_alt_head.ix[index, 'parent']) > 0
Пример #4
0
def test_alt_hasnot_parent():
    df_head = set_gb('data/pristine/NEWGB.csv').head()
    df_fam_head = set_fam(df_head)
    df_alt_head = set_alt(df_fam_head)
    for index, row in df_alt_head.iterrows():
        for index in range(5):
            assert math.isnan(df_alt_head.ix[index, 'parent'])
Пример #5
0
def test_not_have_altname():
    df_head = set_gb('data/pristine/NEWGB.csv').head()
    df_alt_head = set_alt(set_fam(df_head))
    assert 'altname' not in df_alt_head.columns
    assert 'ls_altname' not in df_alt_head.columns
Пример #6
0
def test_hasparent():
    df_head = set_gb('data/pristine/NEWGB.csv').head()
    df_alt_head = set_alt(set_fam(df_head))
    assert 'parent' in df_alt_head.columns