Skip to content

Commit 4faaa6f

Browse files
style: apply ruff formatting to test file
1 parent c9c6c5b commit 4faaa6f

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

tests/unit/test_fetch_compat.py

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Tests for backward-compatible fetch() method."""
22

33
import warnings
4-
from unittest.mock import MagicMock, patch
4+
from unittest.mock import MagicMock
55

66
import numpy as np
77
import pytest
@@ -43,19 +43,15 @@ def test_fetch_default_returns_arrays(self, mock_expression):
4343
warnings.simplefilter("ignore", DeprecationWarning)
4444
mock_expression.fetch()
4545

46-
mock_expression.to_arrays.assert_called_once_with(
47-
order_by=None, limit=None, offset=None, squeeze=False
48-
)
46+
mock_expression.to_arrays.assert_called_once_with(order_by=None, limit=None, offset=None, squeeze=False)
4947

5048
def test_fetch_as_dict_true(self, mock_expression):
5149
"""fetch(as_dict=True) should call to_dicts()."""
5250
with warnings.catch_warnings():
5351
warnings.simplefilter("ignore", DeprecationWarning)
5452
mock_expression.fetch(as_dict=True)
5553

56-
mock_expression.to_dicts.assert_called_once_with(
57-
order_by=None, limit=None, offset=None, squeeze=False
58-
)
54+
mock_expression.to_dicts.assert_called_once_with(order_by=None, limit=None, offset=None, squeeze=False)
5955

6056
def test_fetch_with_attrs_returns_dicts(self, mock_expression):
6157
"""fetch('col1', 'col2') should call proj().to_dicts()."""
@@ -82,9 +78,7 @@ def test_fetch_format_frame(self, mock_expression):
8278
warnings.simplefilter("ignore", DeprecationWarning)
8379
mock_expression.fetch(format="frame")
8480

85-
mock_expression.to_pandas.assert_called_once_with(
86-
order_by=None, limit=None, offset=None, squeeze=False
87-
)
81+
mock_expression.to_pandas.assert_called_once_with(order_by=None, limit=None, offset=None, squeeze=False)
8882

8983
def test_fetch_format_frame_with_attrs_raises(self, mock_expression):
9084
"""fetch(format='frame') with attrs should raise error."""
@@ -101,16 +95,12 @@ def test_fetch_passes_order_by_limit_offset(self, mock_expression):
10195
warnings.simplefilter("ignore", DeprecationWarning)
10296
mock_expression.fetch(order_by="id", limit=10, offset=5)
10397

104-
mock_expression.to_arrays.assert_called_once_with(
105-
order_by="id", limit=10, offset=5, squeeze=False
106-
)
98+
mock_expression.to_arrays.assert_called_once_with(order_by="id", limit=10, offset=5, squeeze=False)
10799

108100
def test_fetch_passes_squeeze(self, mock_expression):
109101
"""fetch(squeeze=True) should pass squeeze to output methods."""
110102
with warnings.catch_warnings():
111103
warnings.simplefilter("ignore", DeprecationWarning)
112104
mock_expression.fetch(squeeze=True)
113105

114-
mock_expression.to_arrays.assert_called_once_with(
115-
order_by=None, limit=None, offset=None, squeeze=True
116-
)
106+
mock_expression.to_arrays.assert_called_once_with(order_by=None, limit=None, offset=None, squeeze=True)

0 commit comments

Comments
 (0)