Skip to content

Commit c4272ff

Browse files
committed
Ruff
1 parent 4c356c9 commit c4272ff

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

tests/test_bigquery_provider.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ class TestInitialization:
6767
"""Tests for the __init__ method."""
6868

6969

70-
def test_init_sets_bigquery_options_and_instance_vars(
71-
self, provider: BigQueryProvider, mock_bpd: MagicMock
72-
):
70+
def test_init_sets_bigquery_options_and_instance_vars(self, provider: BigQueryProvider, mock_bpd: MagicMock):
7371
"""
7472
Tests that BigQueryProvider initializes correctly, setting BigQuery options and instance variables.
7573
"""

tests/test_blockchain_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,9 @@ def test_determine_transaction_nonce_uses_oldest_pending_for_replacement(
375375
blockchain_client.mock_w3_instance.eth.get_block.assert_called_once_with("pending", full_transactions=True)
376376

377377

378-
def test_determine_transaction_nonce_falls_back_to_latest_on_nonce_gap(self, blockchain_client: BlockchainClient):
378+
def test_determine_transaction_nonce_falls_back_to_latest_on_nonce_gap(
379+
self, blockchain_client: BlockchainClient
380+
):
379381
"""
380382
Tests that nonce determination falls back to the latest nonce
381383
if no pending txs are found but a nonce gap exists.

tests/test_configuration.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ def test_parse_and_validate_credentials_json_fails_on_invalid_json(self, creds_j
536536
with pytest.raises(ValueError, match=expected_error_msg):
537537
manager._parse_and_validate_credentials_json(creds_json)
538538

539+
539540
@pytest.mark.parametrize(
540541
"creds_json, expected_error_msg",
541542
[
@@ -586,9 +587,7 @@ def test_setup_google_credentials_succeeds_with_service_account_json(
586587
assert call_args[0] == parsed_json
587588

588589

589-
def test_setup_service_account_fails_on_sdk_error(
590-
self, mock_env, mock_google_auth, mock_service_account_json
591-
):
590+
def test_setup_service_account_fails_on_sdk_error(self, mock_env, mock_google_auth, mock_service_account_json):
592591
"""
593592
GIVEN the Google SDK fails to create credentials from service account info
594593
WHEN _setup_service_account_credentials_from_dict is called

tests/test_scheduler.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def test_get_last_run_date_handles_various_scenarios(
181181
file_exists,
182182
expected_date_str,
183183
scheduler: Scheduler,
184-
mock_dependencies: SimpleNamespace
184+
mock_dependencies: SimpleNamespace,
185185
):
186186
"""Tests get_last_run_date under various conditions."""
187187
mock_datetime.now.return_value = datetime(2023, 10, 27)
@@ -229,7 +229,9 @@ def test_get_last_run_date_logs_error_on_corrupt_file(
229229
mock_dependencies.logger.error.assert_called_once()
230230

231231

232-
def test_save_last_run_date_writes_correctly_to_file(self, scheduler: Scheduler, mock_dependencies: SimpleNamespace):
232+
def test_save_last_run_date_writes_correctly_to_file(
233+
self, scheduler: Scheduler, mock_dependencies: SimpleNamespace
234+
):
233235
"""Tests that `save_last_run_date` correctly writes the formatted date string to a file."""
234236
run_date = date(2023, 10, 27)
235237
expected_dir = "/app/data"
@@ -366,7 +368,9 @@ class TestSchedulerRunLoop:
366368
"""Tests for the main `run` loop of the scheduler."""
367369

368370

369-
def test_run_loop_calls_run_pending_and_sleeps_correctly(self, scheduler: Scheduler, mock_dependencies: SimpleNamespace):
371+
def test_run_loop_calls_run_pending_and_sleeps_correctly(
372+
self, scheduler: Scheduler, mock_dependencies: SimpleNamespace
373+
):
370374
"""Tests that the run loop correctly calls schedule and sleeps."""
371375
mock_dependencies.schedule.run_pending.side_effect = [None, None, KeyboardInterrupt]
372376
scheduler.update_healthcheck = MagicMock()

0 commit comments

Comments
 (0)