Skip to content

Commit

Permalink
Remove deprecated squeeze statements
Browse files Browse the repository at this point in the history
  • Loading branch information
mfleschutz committed May 22, 2024
1 parent b9e0ee5 commit 53c0059
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/common/hasher.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

def read_expected_hashes(which: str) -> pd.Series:
fp = HASH_DIR / FILE_FMT.format(which=which)
return pd.read_csv(fp, index_col=[0, 1], squeeze=True)
return pd.read_csv(fp, index_col=[0, 1]).squeeze()


def save_expected_hashes(which: str) -> None:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_delete_cache(mocker, capsys):
fp = paths.CACHE_DIR / "test_file_XXXX.parquet"
tuplelist = [(True, "1 files deleted\n"), (False, "No files deleted\n")]

for (patch_value, msg) in tuplelist:
for patch_value, msg in tuplelist:
fp.touch(exist_ok=True)
assert fp.exists()
mocker.patch("elmada.helper.confirm_deletion", return_value=patch_value)
Expand Down Expand Up @@ -141,9 +141,9 @@ def test_read(mocker):
for suffix, func in zip(suffices, funcs):
fp = Path(f"_.{suffix}")
mock = mocker.patch(func, return_value=pd.DataFrame({0: [1, 2, 3]}))
result = hp.read(fp, squeeze=True)
result = hp.read(fp).squeeze()
assert isinstance(result, pd.Series)
result = hp.read(fp, squeeze=False)
result = hp.read(fp)
assert isinstance(result, pd.DataFrame)
assert mock.called

Expand Down

0 comments on commit 53c0059

Please sign in to comment.