Skip to content

Commit 7be23e5

Browse files
authored
Further test fixes (#738)
1 parent ee11981 commit 7be23e5

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

tests/integration/test_bash_generation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
def test_bash_generation():
77
# cfg is not machine-specific
88
assert os.system("zppy -c tests/integration/test_bash_generation.cfg") == 0
9-
assert os.system("rm test_bash_generation_output/post/scripts/provenance*") == 0
9+
assert os.system("rm -rf test_bash_generation_output/post/scripts/provenance*") == 0
1010
expected_dir = get_expansions()["expected_dir"]
1111
assert (
1212
os.system(

tests/integration/test_campaign.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
def test_campaign_cryosphere():
88
assert os.system("zppy -c tests/integration/test_campaign_cryosphere.cfg") == 0
99
assert os.system("rm test_campaign_cryosphere_output/post/scripts/*.bash") == 0
10-
assert os.system("rm test_campaign_cryosphere_output/post/scripts/provenance*") == 0
10+
assert (
11+
os.system("rm -rf test_campaign_cryosphere_output/post/scripts/provenance*")
12+
== 0
13+
)
1114
expected_dir = get_expansions()["expected_dir"]
1215
assert (
1316
os.system(
@@ -29,7 +32,7 @@ def test_campaign_cryosphere_override():
2932
)
3033
assert (
3134
os.system(
32-
"rm test_campaign_cryosphere_override_output/post/scripts/provenance*"
35+
"rm -rf test_campaign_cryosphere_override_output/post/scripts/provenance*"
3336
)
3437
== 0
3538
)
@@ -47,7 +50,8 @@ def test_campaign_high_res_v1():
4750
assert os.system("zppy -c tests/integration/test_campaign_high_res_v1.cfg") == 0
4851
assert os.system("rm test_campaign_high_res_v1_output/post/scripts/*.bash") == 0
4952
assert (
50-
os.system("rm test_campaign_high_res_v1_output/post/scripts/provenance*") == 0
53+
os.system("rm -rf test_campaign_high_res_v1_output/post/scripts/provenance*")
54+
== 0
5155
)
5256
expected_dir = get_expansions()["expected_dir"]
5357
assert (
@@ -62,7 +66,7 @@ def test_campaign_high_res_v1():
6266
def test_campaign_none():
6367
assert os.system("zppy -c tests/integration/test_campaign_none.cfg") == 0
6468
assert os.system("rm test_campaign_none_output/post/scripts/*.bash") == 0
65-
assert os.system("rm test_campaign_none_output/post/scripts/provenance*") == 0
69+
assert os.system("rm -rf test_campaign_none_output/post/scripts/provenance*") == 0
6670
expected_dir = get_expansions()["expected_dir"]
6771
assert (
6872
os.system(
@@ -77,7 +81,8 @@ def test_campaign_water_cycle():
7781
assert os.system("zppy -c tests/integration/test_campaign_water_cycle.cfg") == 0
7882
assert os.system("rm test_campaign_water_cycle_output/post/scripts/*.bash") == 0
7983
assert (
80-
os.system("rm test_campaign_water_cycle_output/post/scripts/provenance*") == 0
84+
os.system("rm -rf test_campaign_water_cycle_output/post/scripts/provenance*")
85+
== 0
8186
)
8287
expected_dir = get_expansions()["expected_dir"]
8388
assert (
@@ -100,7 +105,7 @@ def test_campaign_water_cycle_override():
100105
)
101106
assert (
102107
os.system(
103-
"rm test_campaign_water_cycle_override_output/post/scripts/provenance*"
108+
"rm -rf test_campaign_water_cycle_override_output/post/scripts/provenance*"
104109
)
105110
== 0
106111
)

tests/integration/test_defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def test_defaults():
77
# cfg is not machine-specific
88
assert os.system("zppy -c tests/integration/test_defaults.cfg") == 0
99
assert os.system("rm test_defaults_output/post/scripts/*.bash") == 0
10-
assert os.system("rm test_defaults_output/post/scripts/provenance*") == 0
10+
assert os.system("rm -rf test_defaults_output/post/scripts/provenance*") == 0
1111
assert (
1212
os.system(
1313
"rm -rf test_defaults_output/post/scripts/global_time_series_0001-0020_dir"

tests/integration/test_last_year.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def test_last_year():
99
assert os.system("zppy -c tests/integration/test_last_year.cfg --last-year 12") == 0
1010
# Remove files that are not deterministic:
1111
assert os.system("rm test_last_year_output/post/scripts/*.settings") == 0
12-
assert os.system("rm test_last_year_output/post/scripts/provenance*") == 0
12+
assert os.system("rm -rf test_last_year_output/post/scripts/provenance*") == 0
1313
actual_files = sorted(os.listdir("test_last_year_output/post/scripts"))
1414
expected_files = [
1515
"climo_atm_monthly_180x360_aave_0001-0010.bash",

0 commit comments

Comments
 (0)