@@ -45,13 +45,9 @@ def test_cime_case(self):
4545 )
4646
4747 case .flush ()
48- # the strip().splitlines()[-1] avoids a potential warning message in the output.
49- build_complete = (
50- utils .run_cmd_no_fail (
51- "./xmlquery BUILD_COMPLETE --value" , from_dir = casedir
52- )
53- .strip ()
54- .splitlines ()[- 1 ]
48+
49+ build_complete = utils .run_cmd_no_fail (
50+ "./xmlquery BUILD_COMPLETE --value" , from_dir = casedir
5551 )
5652 self .assertEqual (
5753 build_complete ,
@@ -346,26 +342,16 @@ def test_cime_case_xmlchange_append(self):
346342 self .run_cmd_assert_result (
347343 "./xmlchange --id PIO_CONFIG_OPTS --val='-opt1'" , from_dir = casedir
348344 )
349- # Avoids a potential warning in output about python version
350- result = (
351- self .run_cmd_assert_result (
352- "./xmlquery --value PIO_CONFIG_OPTS" , from_dir = casedir
353- )
354- .strip ()
355- .splitlines ()[- 1 ]
345+ result = self .run_cmd_assert_result (
346+ "./xmlquery --value PIO_CONFIG_OPTS" , from_dir = casedir
356347 )
357348 self .assertEqual (result , "-opt1" )
358349
359350 self .run_cmd_assert_result (
360351 "./xmlchange --id PIO_CONFIG_OPTS --val='-opt2' --append" , from_dir = casedir
361352 )
362- # the strip().splitlines()[-1] avoids a potential warning message in the output.
363- result = (
364- self .run_cmd_assert_result (
365- "./xmlquery --value PIO_CONFIG_OPTS" , from_dir = casedir
366- )
367- .strip ()
368- .splitlines ()[- 1 ]
353+ result = self .run_cmd_assert_result (
354+ "./xmlquery --value PIO_CONFIG_OPTS" , from_dir = casedir
369355 )
370356 self .assertEqual (result , "-opt1 -opt2" )
371357
@@ -519,14 +505,10 @@ def test_cime_case_test_walltime_mgmt_6(self):
519505 )
520506
521507 self .run_cmd_assert_result ("./case.setup --reset" , from_dir = casedir )
522- # the strip().splitlines()[-1] avoids a potential warning message in the output.
523- result = (
524- self .run_cmd_assert_result (
525- "./xmlquery JOB_WALLCLOCK_TIME --subgroup=case.test --value" ,
526- from_dir = casedir ,
527- )
528- .strip ()
529- .splitlines ()[- 1 ]
508+
509+ result = self .run_cmd_assert_result (
510+ "./xmlquery JOB_WALLCLOCK_TIME --subgroup=case.test --value" ,
511+ from_dir = casedir ,
530512 )
531513 with Case (casedir ) as case :
532514 walltime_format = case .get_value ("walltime_format" , subgroup = None )
@@ -553,14 +535,9 @@ def test_cime_case_test_walltime_mgmt_7(self):
553535
554536 self .run_cmd_assert_result ("./case.setup --reset" , from_dir = casedir )
555537
556- # the strip().splitlines()[-1] avoids a potential warning message in the output.
557- result = (
558- self .run_cmd_assert_result (
559- "./xmlquery JOB_WALLCLOCK_TIME --subgroup=case.test --value" ,
560- from_dir = casedir ,
561- )
562- .strip ()
563- .splitlines ()[- 1 ]
538+ result = self .run_cmd_assert_result (
539+ "./xmlquery JOB_WALLCLOCK_TIME --subgroup=case.test --value" ,
540+ from_dir = casedir ,
564541 )
565542 with Case (casedir ) as case :
566543 walltime_format = case .get_value ("walltime_format" , subgroup = None )
@@ -620,16 +597,10 @@ def test_cime_case_test_custom_project(self):
620597 env_changes = "unset CIME_GLOBAL_WALLTIME &&" ,
621598 )
622599
623- # the strip().splitlines()[-1] avoids a potential warning message in the output.
624- result = (
625- self .run_cmd_assert_result (
626- "./xmlquery --non-local --value PROJECT --subgroup=case.test" ,
627- from_dir = casedir ,
628- )
629- .strip ()
630- .splitlines ()[- 1 ]
600+ result = self .run_cmd_assert_result (
601+ "./xmlquery --non-local --value PROJECT --subgroup=case.test" ,
602+ from_dir = casedir ,
631603 )
632-
633604 self .assertEqual (result , "testproj" )
634605
635606 def test_create_test_longname (self ):
0 commit comments