Skip to content

Commit

Permalink
make black for the previous PR
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisjared authored and rgieseke committed Apr 29, 2019
1 parent c236550 commit c65fd4b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 39 deletions.
41 changes: 22 additions & 19 deletions pymagicc/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,22 +936,25 @@ def create_copy(self):
super(MAGICC7, self).create_copy()
# Override the USER configuration for MAGICC7 so that it always conforms with pymagicc's expectations
# The MAGCFG_USER.CFG configuration for MAGICC7 changes frequently in the repository
self.update_config('MAGCFG_USER.CFG', **{
'file_emisscen_2': "NONE",
'file_emisscen_3': "NONE",
'file_emisscen_4': "NONE",
'file_emisscen_5': "NONE",
'file_emisscen_6': "NONE",
'file_emisscen_7': "NONE",
'file_emisscen_8': "NONE",
'file_tuningmodel_1': "PYMAGICC",
'file_tuningmodel_2': "USER",
'file_tuningmodel_3': "USER",
'file_tuningmodel_4': "USER",
'file_tuningmodel_5': "USER",
'file_tuningmodel_6': "USER",
'file_tuningmodel_7': "USER",
'file_tuningmodel_8': "USER",
'file_tuningmodel_9': "USER",
'file_tuningmodel_10': "USER"
})
self.update_config(
"MAGCFG_USER.CFG",
**{
"file_emisscen_2": "NONE",
"file_emisscen_3": "NONE",
"file_emisscen_4": "NONE",
"file_emisscen_5": "NONE",
"file_emisscen_6": "NONE",
"file_emisscen_7": "NONE",
"file_emisscen_8": "NONE",
"file_tuningmodel_1": "PYMAGICC",
"file_tuningmodel_2": "USER",
"file_tuningmodel_3": "USER",
"file_tuningmodel_4": "USER",
"file_tuningmodel_5": "USER",
"file_tuningmodel_6": "USER",
"file_tuningmodel_7": "USER",
"file_tuningmodel_8": "USER",
"file_tuningmodel_9": "USER",
"file_tuningmodel_10": "USER",
},
)
40 changes: 20 additions & 20 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1099,30 +1099,30 @@ def test_get_output_filenames(mock_listdir):

def test_default_config(package):
if package.version == 6:
pytest.skip('Only checking MAGICC7')
pytest.skip("Only checking MAGICC7")

expected_config = {
'file_emisscen_2': "NONE",
'file_emisscen_3': "NONE",
'file_emisscen_4': "NONE",
'file_emisscen_5': "NONE",
'file_emisscen_6': "NONE",
'file_emisscen_7': "NONE",
'file_emisscen_8': "NONE",
'file_tuningmodel_1': "PYMAGICC",
'file_tuningmodel_2': "USER",
'file_tuningmodel_3': "USER",
'file_tuningmodel_4': "USER",
'file_tuningmodel_5': "USER",
'file_tuningmodel_6': "USER",
'file_tuningmodel_7': "USER",
'file_tuningmodel_8': "USER",
'file_tuningmodel_9': "USER",
'file_tuningmodel_10': "USER"
"file_emisscen_2": "NONE",
"file_emisscen_3": "NONE",
"file_emisscen_4": "NONE",
"file_emisscen_5": "NONE",
"file_emisscen_6": "NONE",
"file_emisscen_7": "NONE",
"file_emisscen_8": "NONE",
"file_tuningmodel_1": "PYMAGICC",
"file_tuningmodel_2": "USER",
"file_tuningmodel_3": "USER",
"file_tuningmodel_4": "USER",
"file_tuningmodel_5": "USER",
"file_tuningmodel_6": "USER",
"file_tuningmodel_7": "USER",
"file_tuningmodel_8": "USER",
"file_tuningmodel_9": "USER",
"file_tuningmodel_10": "USER",
}
cfg = read_cfg_file(join(package.run_dir, 'MAGCFG_USER.CFG'))
cfg = read_cfg_file(join(package.run_dir, "MAGCFG_USER.CFG"))
for key, expected in expected_config.items():
assert cfg['nml_allcfgs'][key] == expected
assert cfg["nml_allcfgs"][key] == expected


def test_out_forcing():
Expand Down

0 comments on commit c65fd4b

Please sign in to comment.