Skip to content

Commit

Permalink
test(pyflink): adjust common tests for dir outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
deepyaman committed Apr 2, 2024
1 parent 9abdb9d commit 7c5a9fa
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ibis/backends/tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,10 @@ def test_table_to_parquet_writer_kwargs(version, tmp_path, backend, awards_playe
awards_players.to_pandas().fillna(pd.NA), df.fillna(pd.NA)
)

md = pa.parquet.read_metadata(outparquet)
if outparquet.is_file():
md = pa.parquet.read_metadata(outparquet)

assert md.format_version == version
assert md.format_version == version


@pytest.mark.notimpl(
Expand Down Expand Up @@ -290,9 +291,10 @@ def test_memtable_to_file(tmp_path, con, ftype, monkeypatch):

getattr(con, f"to_{ftype}")(memtable, outfile)

assert outfile.is_file()
assert outfile.exists()


@pytest.mark.never(["pyspark"], reason="backend writes a dir", raises=IsADirectoryError)
def test_table_to_csv(tmp_path, backend, awards_players):
outcsv = tmp_path / "out.csv"

Expand All @@ -311,6 +313,7 @@ def test_table_to_csv(tmp_path, backend, awards_players):
reason="cannot inline WriteOptions objects",
raises=DuckDBParserException,
)
@pytest.mark.never(["pyspark"], reason="backend writes a dir", raises=IsADirectoryError)
@pytest.mark.parametrize("delimiter", [";", "\t"], ids=["semicolon", "tab"])
def test_table_to_csv_writer_kwargs(delimiter, tmp_path, awards_players):
outcsv = tmp_path / "out.csv"
Expand Down

0 comments on commit 7c5a9fa

Please sign in to comment.