Skip to content

Commit

Permalink
chore: fix order of context manager
Browse files Browse the repository at this point in the history
  • Loading branch information
ncclementi committed Apr 4, 2024
1 parent ce80f1c commit ce51755
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ibis/backends/tests/test_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ def gzip_csv(data_dir, tmp_path):
]
)
def test_register_csv(con, data_dir, fname, in_table_name, out_table_name):
with pytest.warns(FutureWarning, match="v9.0"):
with pushd(data_dir / "csv"):
with pushd(data_dir / "csv"):
with pytest.warns(FutureWarning, match="v9.0"):
table = con.register(fname, table_name=in_table_name)

assert any(out_table_name in t for t in con.list_tables())
Expand All @@ -126,8 +126,8 @@ def test_register_csv(con, data_dir, fname, in_table_name, out_table_name):
]
)
def test_register_csv_gz(con, data_dir, gzip_csv):
with pytest.warns(FutureWarning, match="v9.0"):
with pushd(data_dir):
with pushd(data_dir):
with pytest.warns(FutureWarning, match="v9.0"):
table = con.register(gzip_csv)

assert table.count().execute()
Expand Down Expand Up @@ -218,8 +218,8 @@ def test_register_parquet(

pq.write_table(table, tmp_path / fname.name)

with pytest.warns(FutureWarning, match="v9.0"):
with pushd(tmp_path):
with pushd(tmp_path):
with pytest.warns(FutureWarning, match="v9.0"):
table = con.register(f"parquet://{fname.name}", table_name=in_table_name)

assert any(out_table_name in t for t in con.list_tables())
Expand Down Expand Up @@ -258,8 +258,8 @@ def test_register_iterator_parquet(

pq.write_table(table, tmp_path / "functional_alltypes.parquet")

with pytest.warns(FutureWarning, match="v9.0"):
with pushd(tmp_path):
with pushd(tmp_path):
with pytest.warns(FutureWarning, match="v9.0"):
table = con.register(
[
"parquet://functional_alltypes.parquet",
Expand Down

0 comments on commit ce51755

Please sign in to comment.