@@ -387,7 +387,6 @@ def test_load_gregorian_calendar_with_pre_zero_years(self, test_cube):
387
387
class TestMarbleCMIP5Cube (_SCMCubeIntegrationTester ):
388
388
tclass = MarbleCMIP5Cube
389
389
390
-
391
390
def test_load_and_concatenate_files_in_directory_same_time (self , test_cube ):
392
391
tdir = join (
393
392
TEST_DATA_MARBLE_CMIP5_DIR ,
@@ -501,17 +500,18 @@ def test_get_load_data_from_identifiers_args_from_filepath_no_root_dir(
501
500
502
501
@pytest .mark .parametrize (
503
502
"tpath" ,
504
- [
505
- "cmip5/1pctCO2/fx/sftlf/CanESM2/r0i0p0/sftlf_fx_HadGem3_1pctCO2_r0i0p0.nc"
506
- ],
503
+ ["cmip5/1pctCO2/fx/sftlf/CanESM2/r0i0p0/sftlf_fx_HadGem3_1pctCO2_r0i0p0.nc" ],
507
504
)
508
505
def test_get_load_data_from_identifiers_args_from_filepath_errors (
509
506
self , test_cube , tpath
510
507
):
511
508
error_msg = (
512
- re .escape ("Path and filename do not agree:" ) + "\n "
513
- + re .escape (" - path model: CanESM2" ) + "\n "
514
- + re .escape (" - filename model: HadGem3" ) + "\n "
509
+ re .escape ("Path and filename do not agree:" )
510
+ + "\n "
511
+ + re .escape (" - path model: CanESM2" )
512
+ + "\n "
513
+ + re .escape (" - filename model: HadGem3" )
514
+ + "\n "
515
515
)
516
516
with pytest .raises (ValueError , match = error_msg ):
517
517
test_cube .get_load_data_from_identifiers_args_from_filepath (tpath )
@@ -520,7 +520,6 @@ def test_get_load_data_from_identifiers_args_from_filepath_errors(
520
520
class TestCMIP6Input4MIPsCube (_SCMCubeIntegrationTester ):
521
521
tclass = CMIP6Input4MIPsCube
522
522
523
-
524
523
def test_load_gregorian_calendar_with_pre_zero_years (self , test_cube ):
525
524
expected_warn = (
526
525
"Your calendar is gregorian yet has units of 'days since 0-1-1'. We "
@@ -627,16 +626,19 @@ def test_get_load_data_from_identifiers_args_from_filepath_no_root_dir(
627
626
@pytest .mark .parametrize (
628
627
"tpath" ,
629
628
[
630
- "input4MIPs/CMIP6/CMIP/PCMDI/PCMDI-AMIP-1-1-4/ocean/mon/tas/gn/v20180427/tos_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1-4_gn_187001-201712.nc" ,
629
+ "input4MIPs/CMIP6/CMIP/PCMDI/PCMDI-AMIP-1-1-4/ocean/mon/tas/gn/v20180427/tos_input4MIPs_SSTsAndSeaIce_CMIP_PCMDI-AMIP-1-1-4_gn_187001-201712.nc"
631
630
],
632
631
)
633
632
def test_get_load_data_from_identifiers_args_from_filepath_errors (
634
633
self , test_cube , tpath
635
634
):
636
635
error_msg = (
637
- re .escape ("Path and filename do not agree:" ) + "\n "
638
- + re .escape (" - path variable_id: tas" ) + "\n "
639
- + re .escape (" - filename variable_id: tos" ) + "\n "
636
+ re .escape ("Path and filename do not agree:" )
637
+ + "\n "
638
+ + re .escape (" - path variable_id: tas" )
639
+ + "\n "
640
+ + re .escape (" - filename variable_id: tos" )
641
+ + "\n "
640
642
)
641
643
with pytest .raises (ValueError , match = error_msg ):
642
644
test_cube .get_load_data_from_identifiers_args_from_filepath (tpath )
@@ -645,7 +647,6 @@ def test_get_load_data_from_identifiers_args_from_filepath_errors(
645
647
class TestCMIP6OutputCube (_SCMCubeIntegrationTester ):
646
648
tclass = CMIP6OutputCube
647
649
648
-
649
650
def test_get_load_data_from_identifiers_args_from_filepath (self , test_cube ):
650
651
tpath = "tests/test_data/cmip6-output/CMIP6/DCPP/CNRM-CERFACS/CNRM-CM6-1/dcppA-hindcast/s1960-r2i1p1f3/day/pr/gn/v20160215/pr_day_CNRM-CM6-1_dcppA-hindcast_s1960-r2i1p1f3_gn_198001-198412.nc"
651
652
expected = {
@@ -721,9 +722,12 @@ def test_get_load_data_from_identifiers_args_from_filepath_errors(
721
722
self , test_cube , tpath
722
723
):
723
724
error_msg = (
724
- re .escape ("Path and filename do not agree:" ) + "\n "
725
- + re .escape (" - path experiment_id: dcppA-hindcast" ) + "\n "
726
- + re .escape (" - filename experiment_id: dcppA" ) + "\n "
725
+ re .escape ("Path and filename do not agree:" )
726
+ + "\n "
727
+ + re .escape (" - path experiment_id: dcppA-hindcast" )
728
+ + "\n "
729
+ + re .escape (" - filename experiment_id: dcppA" )
730
+ + "\n "
727
731
)
728
732
with pytest .raises (ValueError , match = error_msg ):
729
733
test_cube .get_load_data_from_identifiers_args_from_filepath (tpath )
0 commit comments