Add flake8-unused-arguments
- Request fixtures only needed for their side effects via `@pytest.mark.usefixtures()` instead of as arguments - Remove fixtures that a test does not use at all - Exempt abstract methods because their arguments define an interface
This commit is contained in:
parent
29a711f049
commit
882d3c98ba
2 changed files with 34 additions and 18 deletions
|
|
@ -136,9 +136,9 @@ class TestGenericForecastingModelProperties:
|
|||
|
||||
@pytest.mark.db
|
||||
@pytest.mark.r
|
||||
@pytest.mark.usefixtures("db_session")
|
||||
def test_make_forecast(
|
||||
self,
|
||||
db_session,
|
||||
model_cls,
|
||||
order_history,
|
||||
pixel,
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class TestMethods:
|
|||
|
||||
assert result == test_config.START
|
||||
|
||||
def test_first_order_at_non_existing_pixel(self, order_history, good_pixel_id):
|
||||
def test_first_order_at_non_existing_pixel(self, order_history):
|
||||
"""Test `OrderHistory.first_order_at()` with bad input."""
|
||||
with pytest.raises(
|
||||
LookupError,
|
||||
|
|
@ -85,7 +85,7 @@ class TestMethods:
|
|||
one_time_step = dt.timedelta(minutes=test_config.LONG_TIME_STEP)
|
||||
assert result == test_config.END - one_time_step
|
||||
|
||||
def test_last_order_at_non_existing_pixel(self, order_history, good_pixel_id):
|
||||
def test_last_order_at_non_existing_pixel(self, order_history):
|
||||
"""Test `OrderHistory.last_order_at()` with bad input."""
|
||||
with pytest.raises(
|
||||
LookupError,
|
||||
|
|
|
|||
Loading…
Reference in a new issue