示例#1
0
def test_read_cols_multi_word_col():
    gold = [['one', 'two'], ['three', 'four'], ['five', 'six'],
            ['seven', 'eight'], ['nine', 'ten']]
    data = _read_from_col(2, [os.path.join(TEST_LOC, 'multi_col.txt')])
    assert data == gold
示例#2
0
def test_read_cols_multi_col_file():
    gold = [['one2'], ['two2'], ['three2'], ['four2'], ['five2']]
    data = _read_from_col(1, [os.path.join(TEST_LOC, 'multi_col.txt')])
    assert data == gold
示例#3
0
def test_read_cols_single_col_file():
    gold = [['one'], ['two'], ['three'], ['four'], ['five']]
    data = _read_from_col(0, [os.path.join(TEST_LOC, 'single_col.txt')])
    assert data == gold
示例#4
0
def test_read_cols_multi_word_col():
    gold = [['one', 'two'], ['three', 'four'], ['five', 'six'], ['seven', 'eight'], ['nine', 'ten']]
    data = _read_from_col(2, [os.path.join(TEST_LOC, 'multi_col.txt')])
    assert data == gold
示例#5
0
def test_read_cols_multi_col_file():
    gold = [['one2'], ['two2'], ['three2'], ['four2'], ['five2']]
    data = _read_from_col(1, [os.path.join(TEST_LOC, 'multi_col.txt')])
    assert data == gold
示例#6
0
def test_read_cols_single_col_file():
    gold = [['one'], ['two'], ['three'], ['four'], ['five']]
    data = _read_from_col(0, [os.path.join(TEST_LOC, 'single_col.txt')])
    assert data == gold