(tempdir)
| 780 | |
| 781 | |
| 782 | def test_read_column_duplicated_in_file(tempdir): |
| 783 | # duplicated columns in feather file (only works for feather v2) |
| 784 | table = pa.table([[1, 2, 3], [4, 5, 6], [7, 8, 9]], names=['a', 'b', 'a']) |
| 785 | path = str(tempdir / "data.feather") |
| 786 | write_feather(table, path, version=2) |
| 787 | |
| 788 | # no selection works fine |
| 789 | result = read_table(path) |
| 790 | assert result.equals(table) |
| 791 | |
| 792 | # selection with indices works |
| 793 | result = read_table(path, columns=[0, 2]) |
| 794 | assert result.column_names == ['a', 'a'] |
| 795 | |
| 796 | # selection with column names errors |
| 797 | with pytest.raises(ValueError): |
| 798 | read_table(path, columns=['a', 'b']) |
| 799 | |
| 800 | |
| 801 | def test_read_column_with_generator(tempdir, version): |
nothing calls this directly
no test coverage detected