Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 5, 2024
1 parent b8c137d commit bdb66d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ def unreadable_file(tmp_path):
file_path = tmp_path / "unreadable.h5"
file_mock = mock_open()
file_mock.return_value.read.side_effect = PermissionError
with patch("builtins.open", side_effect=file_mock), patch.object(
Path, "exists", return_value=True
with (
patch("builtins.open", side_effect=file_mock),
patch.object(Path, "exists", return_value=True),
):
yield {
"file_path": file_path,
Expand Down
7 changes: 4 additions & 3 deletions tests/test_integration/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ def test_to_sleap_analysis_file_returns_same_h5_file_content(
ds = load_poses.from_sleap_file(sleap_h5_file_path, fps=fps)
save_poses.to_sleap_analysis_file(ds, new_h5_file)

with h5py.File(ds.source_file, "r") as file_in, h5py.File(
new_h5_file, "r"
) as file_out:
with (
h5py.File(ds.source_file, "r") as file_in,
h5py.File(new_h5_file, "r") as file_out,
):
assert set(file_in.keys()) == set(file_out.keys())
keys = [
"track_occupancy",
Expand Down

0 comments on commit bdb66d7

Please sign in to comment.