def test_custom_tables_location(self): """Test constructor with custom tables location.""" cwd = os.path.dirname(os.path.realpath(__file__)) cmor_tables_path = os.path.join(cwd, '..', '..', '..', 'esmvalcore', 'cmor', 'tables', 'cmip6') cmor_tables_path = os.path.abspath(cmor_tables_path) CMIP6Info(cmor_tables_path, default=None, strict=False)
def setUpClass(cls): """ Set up tests. We read CMIP6Info once to keep tests times manageable """ cls.variables_info = CMIP6Info('cmip6', default=CustomInfo())
def setUpClass(cls): """ Set up tests. We read CMIP6Info once to keep tests times manageable """ cls.variables_info = CMIP6Info(cmor_tables_path='obs4mips', default=CustomInfo())
def setUpClass(cls): """Set up tests. We read CMIP6Info once to keep tests times manageable """ cls.variables_info = CMIP6Info('cmip6', default=CustomInfo(), strict=True, alt_names=[ ['sic', 'siconc'], ['tro3', 'o3'], ])
def test_custom_tables_location(self): """Test constructor with custom tables location.""" cmor_path = os.path.dirname(os.path.realpath(esmvalcore.cmor.__file__)) cmor_tables_path = os.path.join(cmor_path, 'tables', 'cmip6') cmor_tables_path = os.path.abspath(cmor_tables_path) CMIP6Info(cmor_tables_path, None, True)