From 702c9bbd34b5f7a6eba5431c40ea7f8cab548f27 Mon Sep 17 00:00:00 2001 From: Spencer Wong Date: Mon, 19 Aug 2024 17:24:49 +1000 Subject: [PATCH] PEP8 fixes --- test/models/test_access.py | 5 ++++- test/test_calendar.py | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/models/test_access.py b/test/models/test_access.py index f56d6c65..53eef41f 100644 --- a/test/models/test_access.py +++ b/test/models/test_access.py @@ -24,6 +24,7 @@ INPUT_ICE_FNAME = "input_ice.nml" RESTART_DATE_FNAME = "restart_date.nml" + def setup_module(module): """ Put any test-wide setup code in here, e.g. creating test files @@ -84,6 +85,7 @@ def access_1year_config(): # Teardown os.remove(config_path) + @pytest.fixture def ice_control_directory(): # Make a cice control subdirectory @@ -102,7 +104,7 @@ def default_input_ice(ice_control_directory): # Create base input_ice.nml namelist ctrl_input_ice_path = ice_control_directory / INPUT_ICE_FNAME - # Default timing values from the input_ice.nml namelist that will be + # Default timing values from the input_ice.nml namelist that will be # overwritten by the calendar calculations. default_input_nml = { "coupling": @@ -157,6 +159,7 @@ def restart_dir(): # Teardown shutil.rmtree(restart_path) + @pytest.fixture def initial_start_date_file(restart_dir): # Initital start date for testing calendar cycling diff --git a/test/test_calendar.py b/test/test_calendar.py index f35d7784..84851b2e 100644 --- a/test/test_calendar.py +++ b/test/test_calendar.py @@ -9,6 +9,7 @@ SEC_PER_DAY = 24*60*60 + @pytest.mark.parametrize( "offset, initial_dt, expected", [ @@ -251,7 +252,7 @@ def test_runtime_from_date( """ Test that the number of seconds calculated for run lengths is correct. """ - runtime = runtime_from_date(start_date, + runtime = runtime_from_date(start_date, years, months, days,