diff --git a/smrf/tests/output/test_netcdf.py b/smrf/tests/output/test_netcdf.py index 61175c3a..8d738fcf 100644 --- a/smrf/tests/output/test_netcdf.py +++ b/smrf/tests/output/test_netcdf.py @@ -5,7 +5,7 @@ from smrf import __version__ from smrf.framework.model_framework import SMRF from smrf.output.output_netcdf import OutputNetcdf -from smrf.tests.test_configurations import SMRFTestCase +from smrf.tests.smrf_test_case import SMRFTestCase class TestOutputNetCDF(SMRFTestCase): diff --git a/smrf/tests/output/test_output_variables.py b/smrf/tests/output/test_output_variables.py index 3d472c27..aed5ff1d 100644 --- a/smrf/tests/output/test_output_variables.py +++ b/smrf/tests/output/test_output_variables.py @@ -5,13 +5,13 @@ from inicheck.tools import cast_all_variables from smrf.framework.model_framework import run_smrf -from smrf.tests.test_configurations import SMRFTestCase +from smrf.tests.smrf_test_case import SMRFTestCase class TestOutputThreadedVariables(SMRFTestCase): def tearDown(self): - super().tearDownClass() + self.remove_output_dir() def change_variables(self, new_variables): config = copy(self.base_config) @@ -60,9 +60,9 @@ def setUpClass(cls): """ super().setUpClass() - config = copy(cls.base_config) + config = cls.base_config_copy() config.raw_cfg['system']['threading'] = False config.apply_recipes() config = cast_all_variables(config, config.mcfg) - cls.base_config = config + cls._base_config = config diff --git a/smrf/tests/recipes/test_wind_recipes.py b/smrf/tests/recipes/test_wind_recipes.py index 2df7a848..c3495732 100644 --- a/smrf/tests/recipes/test_wind_recipes.py +++ b/smrf/tests/recipes/test_wind_recipes.py @@ -75,7 +75,7 @@ class TestInterpWindRecipes(SMRFTestCase, BaseRecipes): def test_interp_wind_recipe(self): """Test the intper wind recipe """ - config = deepcopy(self.base_config) + config = self.base_config_copy() adj_config = { 'wind': { diff --git a/smrf/tests/smrf_test_case.py b/smrf/tests/smrf_test_case.py index cac754c9..ce34903b 100644 --- a/smrf/tests/smrf_test_case.py +++ b/smrf/tests/smrf_test_case.py @@ -1,6 +1,8 @@ import os import shutil import unittest +from copy import deepcopy +from pathlib import PurePath import netCDF4 as nc import numpy as np @@ -15,6 +17,8 @@ class SMRFTestCase(unittest.TestCase): The base test case for SMRF that will load in the configuration file and store as the base config. Also will remove the output directory upon tear down. + + Runs the short simulation over reynolds mountain east """ DIST_VARIABLES = frozenset([ 'air_temp', @@ -25,13 +29,58 @@ class SMRFTestCase(unittest.TestCase): 'wind', ]) + BASE_INI_FILE_NAME = 'test_base_config.ini' + + test_dir = PurePath(smrf.__file__).parent.joinpath('tests') + config_file = os.path.join(test_dir, BASE_INI_FILE_NAME) + @property def dist_variables(self): if self._dist_variables is None: self._dist_variables = list(self.DIST_VARIABLES) return self._dist_variables - def can_i_run_smrf(self, config): + @property + def base_config(self): + return deepcopy(self._base_config) + + @classmethod + def base_config_copy(cls): + return deepcopy(cls._base_config) + + @classmethod + def load_base_config(cls): + cls._base_config = get_user_config(cls.config_file, modules='smrf') + + @classmethod + def setUpClass(cls): + cls.load_base_config() + cls.create_output_dir() + + @classmethod + def tearDownClass(cls): + cls.remove_output_dir() + delattr(cls, '_output_dir') + + @classmethod + def create_output_dir(cls): + folder = os.path.join(cls._base_config.cfg['output']['out_location']) + + # Remove any potential files to ensure fresh run + if os.path.isdir(folder): + shutil.rmtree(folder) + + os.makedirs(folder) + cls._output_dir = folder + + @classmethod + def remove_output_dir(cls): + if hasattr(cls, '_output_dir') and \ + os.path.exists(cls._output_dir): + shutil.rmtree(cls._output_dir) + + @staticmethod + def can_i_run_smrf(config): """ Test whether a config is possible to run """ @@ -43,7 +92,8 @@ def can_i_run_smrf(self, config): print(e) return False - def assertGoldEqual(self, gold, not_gold, error_msg): + @staticmethod + def assert_gold_equal(gold, not_gold, error_msg): """Compare two arrays Arguments: @@ -66,6 +116,9 @@ def assertGoldEqual(self, gold, not_gold, error_msg): err_msg=error_msg ) + def setUp(self): + self._dist_variables = None + def compare_netcdf_files(self, gold_file, test_file): """ Compare two netcdf files to ensure that they are identical. The @@ -96,9 +149,9 @@ def compare_netcdf_files(self, gold_file, test_file): # only compare those that are floats if gold.variables[var_name].datatype != np.dtype('S1'): - error_msg = "Variable: {0} did not match gold standard".\ + error_msg = "Variable: {0} did not match gold standard". \ format(var_name) - self.assertGoldEqual( + self.assert_gold_equal( gold.variables[var_name][:], test.variables[var_name][:], error_msg @@ -106,38 +159,3 @@ def compare_netcdf_files(self, gold_file, test_file): gold.close() test.close() - - def setUp(self): - self._dist_variables = None - - @classmethod - def setUpClass(cls): - """ - Runs the short simulation over reynolds mountain east - """ - base = os.path.dirname(smrf.__file__) - cls.test_dir = os.path.abspath(os.path.join(base, 'tests')) - - config_file = 'test_base_config.ini' - config_file = os.path.join(cls.test_dir, config_file) - - if not os.path.isfile(config_file): - raise Exception('Configuration file not found for testing') - - cls.config_file = config_file - - # read in the base configuration - cls.base_config = get_user_config(config_file, modules='smrf') - - # create the output dir - folder = os.path.join(cls.base_config.cfg['output']['out_location']) - os.makedirs(folder, exist_ok=True) - - @classmethod - def tearDownClass(cls): - """ - Clean up the output directory - """ - folder = os.path.join(cls.base_config.cfg['output']['out_location']) - if os.path.exists(folder): - shutil.rmtree(folder) diff --git a/smrf/tests/smrf_test_case_lakes.py b/smrf/tests/smrf_test_case_lakes.py index 17596253..234e732c 100644 --- a/smrf/tests/smrf_test_case_lakes.py +++ b/smrf/tests/smrf_test_case_lakes.py @@ -1,47 +1,19 @@ import os -import shutil -from inicheck.tools import get_user_config - -import smrf from smrf.tests.smrf_test_case import SMRFTestCase class SMRFTestCaseLakes(SMRFTestCase): """ - The base test case for SMRF that will load in the configuration file - and store as the base config. Also will remove the output directory - upon tear down. + Runs the short simulation over reynolds mountain east """ + test_dir = SMRFTestCase.test_dir.joinpath('Lakes') + config_file = os.path.join(test_dir, 'config.ini') + @classmethod def setUpClass(cls): - """ - Runs the short simulation over reynolds mountain east - """ - - base = os.path.dirname(smrf.__file__) - cls.test_dir = os.path.join(base, 'tests', 'Lakes') - cls.config_file = os.path.join(cls.test_dir, 'config.ini') - - # read in the base configuration - cls.base_config = get_user_config(cls.config_file, modules='smrf') + super().setUpClass() - cls.gold = os.path.abspath(os.path.join(cls.test_dir, 'gold_hrrr')) + cls.gold = cls.test_dir.joinpath('gold_hrrr') cls.output = os.path.join(cls.test_dir, 'output') - - # Remove any potential files to ensure fresh run - if os.path.isdir(cls.output): - shutil.rmtree(cls.output) - - # create the output dir - os.makedirs(cls.output, exist_ok=True) - - @classmethod - def tearDownClass(cls): - """ - Clean up the output directory - """ - folder = os.path.join(cls.base_config.cfg['output']['out_location']) - if os.path.exists(folder): - shutil.rmtree(folder) diff --git a/smrf/tests/test_configurations.py b/smrf/tests/test_configurations.py deleted file mode 100644 index 9a0d2215..00000000 --- a/smrf/tests/test_configurations.py +++ /dev/null @@ -1,13 +0,0 @@ -from smrf.framework.model_framework import can_i_run_smrf -from smrf.tests.smrf_test_case import SMRFTestCase - - -class TestConfigurations(SMRFTestCase): - - def test_base_run(self): - """ - Test the config for running configurations with different options - """ - # test the base run with the config file - result = can_i_run_smrf(self.config_file) - self.assertTrue(result) diff --git a/smrf/tests/test_data_gridded.py b/smrf/tests/test_data_gridded.py index cc39396b..b8c68ea8 100644 --- a/smrf/tests/test_data_gridded.py +++ b/smrf/tests/test_data_gridded.py @@ -1,5 +1,4 @@ import os -from copy import deepcopy from glob import glob from inicheck.tools import cast_all_variables @@ -35,7 +34,7 @@ def compare_hrrr_gold(self, out_dir): def test_grid_wrf(self): """ WRF NetCDF loading """ - config = deepcopy(self.base_config) + config = self.base_config_copy() del config.raw_cfg['csv'] adj_config = { @@ -85,7 +84,7 @@ def test_grid_wrf(self): def test_grid_hrrr_local(self): """ HRRR grib2 loading with local elevation gradient """ - config = deepcopy(self.base_config) + config = self.base_config_copy() del config.raw_cfg['csv'] adj_config = { @@ -150,7 +149,7 @@ def test_grid_hrrr_local(self): def test_grid_netcdf(self): """ Generic NetCDF loading """ - config = deepcopy(self.base_config) + config = self.base_config_copy() del config.raw_cfg['csv'] generic_grid = { diff --git a/smrf/tests/test_full_smrf.py b/smrf/tests/test_full_smrf.py index e8dcc093..45c45797 100644 --- a/smrf/tests/test_full_smrf.py +++ b/smrf/tests/test_full_smrf.py @@ -8,10 +8,8 @@ Tests for an entire smrf run. The SMRF integration run! """ -import shutil import unittest -from copy import copy -from os.path import abspath, isdir, join +from os.path import abspath, join from inicheck.tools import cast_all_variables @@ -21,99 +19,73 @@ class TestThreadedRME(SMRFTestCase): """ - Integration test for SMRF using reynolds mountain east + Integration test for SMRF. + Runs the short simulation over reynolds mountain east. """ @classmethod def setUpClass(cls): - """ - Runs the short simulation over reynolds mountain east - """ super().setUpClass() cls.gold = abspath(join(cls.test_dir, 'RME', 'gold')) cls.output = join(cls.test_dir, 'RME', 'output') - # Remove any potential files to ensure fresh run - if isdir(cls.output): - shutil.rmtree(cls.output) - run_smrf(cls.config_file) def test_air_temp(self): - """Test RME threaded air_temp""" - self.compare_netcdf_files( join(self.gold, 'air_temp.nc'), join(self.output, 'air_temp.nc') ) def test_precip_temp(self): - """Test RME threaded precip_temp""" - self.compare_netcdf_files( join(self.gold, 'precip_temp.nc'), join(self.output, 'precip_temp.nc') ) def test_net_solar(self): - """Test RME threaded net_solar""" - self.compare_netcdf_files( join(self.gold, 'net_solar.nc'), join(self.output, 'net_solar.nc') ) def test_percent_snow(self): - """Test RME threaded percent_snow""" - self.compare_netcdf_files( join(self.gold, 'percent_snow.nc'), join(self.output, 'percent_snow.nc') ) def test_precip(self): - """Test RME threaded precip""" - self.compare_netcdf_files( join(self.gold, 'precip.nc'), join(self.output, 'precip.nc') ) def test_thermal(self): - """Test RME threaded thermal""" - self.compare_netcdf_files( join(self.gold, 'thermal.nc'), join(self.output, 'thermal.nc') ) def test_wind_speed(self): - """Test RME threaded wind_speed""" - self.compare_netcdf_files( join(self.gold, 'wind_speed.nc'), join(self.output, 'wind_speed.nc') ) def test_wind_direction(self): - """Test RME threaded wind_direction""" - self.compare_netcdf_files( join(self.gold, 'wind_direction.nc'), join(self.output, 'wind_direction.nc') ) def test_snow_density(self): - """Test RME threaded snow_density""" - self.compare_netcdf_files( join(self.gold, 'snow_density.nc'), join(self.output, 'snow_density.nc') ) def test_vapor_pressure(self): - """Test RME threaded vapor_pressure""" - self.compare_netcdf_files( join(self.gold, 'vapor_pressure.nc'), join(self.output, 'vapor_pressure.nc') @@ -122,23 +94,17 @@ def test_vapor_pressure(self): class TestRME(SMRFTestCase): """ - Integration test for SMRF using reynolds mountain east without threading + Integration test for SMRF using without threading + Runs the short simulation over reynolds mountain east """ @classmethod def setUpClass(cls): - """ - Runs the short simulation over reynolds mountain east - """ super().setUpClass() cls.gold = abspath(join(cls.test_dir, 'RME', 'gold')) cls.output = join(cls.test_dir, 'RME', 'output') - # Remove any potential files to ensure fresh run - if isdir(cls.output): - shutil.rmtree(cls.output) - - config = copy(cls.base_config) + config = cls.base_config_copy() config.raw_cfg['system']['threading'] = False config.apply_recipes() @@ -147,80 +113,60 @@ def setUpClass(cls): run_smrf(config) def test_air_temp(self): - """Test RME air_temp""" - self.compare_netcdf_files( join(self.gold, 'air_temp.nc'), join(self.output, 'air_temp.nc') ) def test_precip_temp(self): - """Test RME precip_temp""" - self.compare_netcdf_files( join(self.gold, 'precip_temp.nc'), join(self.output, 'precip_temp.nc') ) def test_net_solar(self): - """Test RME net_solar""" - self.compare_netcdf_files( join(self.gold, 'net_solar.nc'), join(self.output, 'net_solar.nc') ) def test_percent_snow(self): - """Test RME percent_snow""" - self.compare_netcdf_files( join(self.gold, 'percent_snow.nc'), join(self.output, 'percent_snow.nc') ) def test_precip(self): - """Test RME precip""" - self.compare_netcdf_files( join(self.gold, 'precip.nc'), join(self.output, 'precip.nc') ) def test_thermal(self): - """Test RME thermal""" - self.compare_netcdf_files( join(self.gold, 'thermal.nc'), join(self.output, 'thermal.nc') ) def test_wind_speed(self): - """Test RME wind_speed""" - self.compare_netcdf_files( join(self.gold, 'wind_speed.nc'), join(self.output, 'wind_speed.nc') ) def test_wind_direction(self): - """Test RME wind_direction""" - self.compare_netcdf_files( join(self.gold, 'wind_direction.nc'), join(self.output, 'wind_direction.nc') ) def test_snow_density(self): - """Test RME snow_density""" - self.compare_netcdf_files( join(self.gold, 'snow_density.nc'), join(self.output, 'snow_density.nc') ) def test_vapor_pressure(self): - """Test RME vapor_pressure""" - self.compare_netcdf_files( join(self.gold, 'vapor_pressure.nc'), join(self.output, 'vapor_pressure.nc') diff --git a/smrf/tests/test_lakes_wind_ninja.py b/smrf/tests/test_lakes_wind_ninja.py index afbbe8a7..40554296 100644 --- a/smrf/tests/test_lakes_wind_ninja.py +++ b/smrf/tests/test_lakes_wind_ninja.py @@ -2,7 +2,6 @@ # -*- coding: utf-8 -*- import os -from copy import deepcopy from inicheck.tools import cast_all_variables @@ -12,85 +11,70 @@ class TestLakes(SMRFTestCaseLakes): """ - Integration test for SMRF using reynolds mountain east without threading + Integration test for SMRF without threading. + Runs the short simulation over reynolds mountain east. """ @classmethod def setUpClass(cls): - """ - Runs the short simulation over reynolds mountain east - """ super().setUpClass() run_smrf(cls.config_file) - def tearDown(self): - pass - def test_air_temp(self): - self.compare_netcdf_files( os.path.join(self.gold, 'air_temp.nc'), os.path.join(self.output, 'air_temp.nc') ) def test_precip_temp(self): - self.compare_netcdf_files( os.path.join(self.gold, 'precip_temp.nc'), os.path.join(self.output, 'precip_temp.nc') ) def test_net_solar(self): - self.compare_netcdf_files( os.path.join(self.gold, 'net_solar.nc'), os.path.join(self.output, 'net_solar.nc') ) def test_percent_snow(self): - self.compare_netcdf_files( os.path.join(self.gold, 'percent_snow.nc'), os.path.join(self.output, 'percent_snow.nc') ) def test_precip(self): - self.compare_netcdf_files( os.path.join(self.gold, 'precip.nc'), os.path.join(self.output, 'precip.nc') ) def test_thermal(self): - self.compare_netcdf_files( os.path.join(self.gold, 'thermal.nc'), os.path.join(self.output, 'thermal.nc') ) def test_wind_speed(self): - self.compare_netcdf_files( os.path.join(self.gold, 'wind_speed.nc'), os.path.join(self.output, 'wind_speed.nc') ) def test_wind_direction(self): - self.compare_netcdf_files( os.path.join(self.gold, 'wind_direction.nc'), os.path.join(self.output, 'wind_direction.nc') ) def test_snow_density(self): - self.compare_netcdf_files( os.path.join(self.gold, 'snow_density.nc'), os.path.join(self.output, 'snow_density.nc') ) def test_vapor_pressure(self): - self.compare_netcdf_files( os.path.join(self.gold, 'vapor_pressure.nc'), os.path.join(self.output, 'vapor_pressure.nc') @@ -98,12 +82,15 @@ def test_vapor_pressure(self): class TestLakesThreaded(SMRFTestCaseLakes): - + """ + Integration test for SMRF. + Runs the short simulation over reynolds mountain east. + """ @classmethod def setUpClass(cls): super().setUpClass() - config = deepcopy(cls.base_config) + config = cls.base_config_copy() config.raw_cfg['system'].update({ 'threading': True, 'max_queue': 1, @@ -115,74 +102,61 @@ def setUpClass(cls): run_smrf(config) - def tearDown(self): - pass - def test_air_temp(self): - self.compare_netcdf_files( os.path.join(self.gold, 'air_temp.nc'), os.path.join(self.output, 'air_temp.nc') ) def test_precip_temp(self): - self.compare_netcdf_files( os.path.join(self.gold, 'precip_temp.nc'), os.path.join(self.output, 'precip_temp.nc') ) def test_net_solar(self): - self.compare_netcdf_files( os.path.join(self.gold, 'net_solar.nc'), os.path.join(self.output, 'net_solar.nc') ) def test_percent_snow(self): - self.compare_netcdf_files( os.path.join(self.gold, 'percent_snow.nc'), os.path.join(self.output, 'percent_snow.nc') ) def test_precip(self): - self.compare_netcdf_files( os.path.join(self.gold, 'precip.nc'), os.path.join(self.output, 'precip.nc') ) def test_thermal(self): - self.compare_netcdf_files( os.path.join(self.gold, 'thermal.nc'), os.path.join(self.output, 'thermal.nc') ) def test_wind_speed(self): - self.compare_netcdf_files( os.path.join(self.gold, 'wind_speed.nc'), os.path.join(self.output, 'wind_speed.nc') ) def test_wind_direction(self): - self.compare_netcdf_files( os.path.join(self.gold, 'wind_direction.nc'), os.path.join(self.output, 'wind_direction.nc') ) def test_snow_density(self): - self.compare_netcdf_files( os.path.join(self.gold, 'snow_density.nc'), os.path.join(self.output, 'snow_density.nc') ) def test_vapor_pressure(self): - self.compare_netcdf_files( os.path.join(self.gold, 'vapor_pressure.nc'), os.path.join(self.output, 'vapor_pressure.nc') diff --git a/smrf/tests/test_load_data.py b/smrf/tests/test_load_data.py index b32364a1..a834f990 100644 --- a/smrf/tests/test_load_data.py +++ b/smrf/tests/test_load_data.py @@ -31,7 +31,7 @@ def test_mysql_data_w_stations(self): convert so SQLalchemy. """ # test a successful run specifying stations - config = deepcopy(self.base_config) + config = self.base_config_copy() options = deepcopy(NWRCCheck.MYSQL_OPTIONS) config.raw_cfg['mysql'] = options @@ -51,7 +51,7 @@ def test_mysql_data_w_client(self): NWRC. """ # test a successful run specifying client - config = deepcopy(self.base_config) + config = self.base_config_copy() options = deepcopy(NWRCCheck.MYSQL_OPTIONS) config.raw_cfg['mysql'] = options @@ -67,7 +67,7 @@ def test_mysql_data_w_client(self): def test_mysql_metadata_error(self): """ test no metadata found """ - config = deepcopy(self.base_config) + config = self.base_config_copy() options = deepcopy(NWRCCheck.MYSQL_OPTIONS) config.raw_cfg['mysql'] = options @@ -83,7 +83,7 @@ def test_mysql_metadata_error(self): def test_mysql_data_error(self): """ test no data found """ - config = deepcopy(self.base_config) + config = self.base_config_copy() options = deepcopy(NWRCCheck.MYSQL_OPTIONS) config.raw_cfg['mysql'] = options @@ -107,7 +107,7 @@ def test_station_dates(self): """ Test the start date not in the data """ - config = deepcopy(self.base_config) + config = self.base_config_copy() # Use dates not in the dataset, expecting an error config.raw_cfg['time']['start_date'] = '1900-01-01 00:00' @@ -126,7 +126,7 @@ def test_all_stations(self): """ # test the end date - config = deepcopy(self.base_config) + config = self.base_config_copy() config.raw_cfg['csv']['stations'] = ['RMESP', 'RME_176'] # apply the new recipies diff --git a/smrf/tests/test_model_framework.py b/smrf/tests/test_model_framework.py index 335a0896..f6097d54 100644 --- a/smrf/tests/test_model_framework.py +++ b/smrf/tests/test_model_framework.py @@ -1,10 +1,8 @@ -import copy - import pytz from pandas import to_datetime from smrf.framework.model_framework import SMRF -from smrf.tests.test_configurations import SMRFTestCase +from smrf.tests.smrf_test_case import SMRFTestCase class TestModelFramework(SMRFTestCase): @@ -59,12 +57,12 @@ class TestModelFrameworkMST(SMRFTestCase): @classmethod def setUpClass(cls): super().setUpClass() - base_config = copy.deepcopy(cls.base_config) + base_config = cls.base_config_copy() base_config.cfg['time']['time_zone'] = 'MST' cls.smrf = SMRF(base_config) def test_timezone_error(self): - base_config = copy.deepcopy(self.base_config) + base_config = self.base_config base_config.cfg['time']['time_zone'] = 'mst' with self.assertRaises(Exception): SMRF(base_config) diff --git a/smrf/tests/test_spatial_methods.py b/smrf/tests/test_spatial_methods.py index 8b82468b..75f5e735 100644 --- a/smrf/tests/test_spatial_methods.py +++ b/smrf/tests/test_spatial_methods.py @@ -12,7 +12,7 @@ # Test the config for different spatial methods # """ # -# config = deepcopy(self.base_config) +# config = self.base_config_copy() # # # config.raw_cfg['air_temp']['distribution'] = 'dk' @@ -37,7 +37,7 @@ # Test the config for the grid # """ # -# config = deepcopy(self.base_config) +# config = self.base_config_copy() # # # config.raw_cfg['air_temp']['distribution'] = 'grid' diff --git a/smrf/tests/test_topo.py b/smrf/tests/test_topo.py index 3aa87c35..ff50c253 100644 --- a/smrf/tests/test_topo.py +++ b/smrf/tests/test_topo.py @@ -4,18 +4,15 @@ import netCDF4 as nc import numpy as np -import smrf from smrf.data import loadTopo +from smrf.tests.smrf_test_case import SMRFTestCase class TestLoadTopo(unittest.TestCase): @classmethod def setUp(self): - base = os.path.dirname(smrf.__file__) - self.test_dir = os.path.abspath(os.path.join(base, 'tests')) - topo_config = { - 'filename': os.path.join(self.test_dir, 'RME/topo/topo.nc'), + 'filename': os.path.join(SMRFTestCase.test_dir, 'RME/topo/topo.nc'), 'northern_hemisphere': True, 'gradient_method': 'gradient_d8', 'sky_view_factor_angles': 72 diff --git a/smrf/tests/utils/test_backup_input.py b/smrf/tests/utils/test_backup_input.py index e6a68ead..104fcd2b 100644 --- a/smrf/tests/utils/test_backup_input.py +++ b/smrf/tests/utils/test_backup_input.py @@ -2,7 +2,7 @@ from smrf import __version__ from smrf.framework.model_framework import SMRF -from smrf.tests.test_configurations import SMRFTestCase +from smrf.tests.smrf_test_case import SMRFTestCase from smrf.utils.utils import backup_input