File tree 2 files changed +14
-6
lines changed
2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -1120,8 +1120,9 @@ def test_cid_file_dir(tmp_path: Path, factor: str) -> None:
1120
1120
stderr = re .sub (r"\s\s+" , " " , stderr )
1121
1121
assert "completed success" in stderr
1122
1122
assert error_code == 0
1123
- cidfiles_count = sum (1 for _ in tmp_path .glob ("**/*" ))
1124
- assert cidfiles_count == 2
1123
+ cidfiles = tmp_path .glob ("**/*" )
1124
+ cidfiles_count = sum (1 for _ in cidfiles )
1125
+ assert cidfiles_count == 1 , list (cidfiles )
1125
1126
1126
1127
1127
1128
@needs_docker
@@ -1180,7 +1181,8 @@ def test_cid_file_w_prefix(tmp_path: Path, factor: str) -> None:
1180
1181
error_code , stdout , stderr = get_main_output (commands )
1181
1182
finally :
1182
1183
listing = tmp_path .iterdir ()
1183
- cidfiles_count = sum (1 for _ in tmp_path .glob ("**/pytestcid*" ))
1184
+ cidfiles = tmp_path .glob ("**/pytestcid*" )
1185
+ cidfiles_count = sum (1 for _ in cidfiles )
1184
1186
stderr = re .sub (r"\s\s+" , " " , stderr )
1185
1187
assert "completed success" in stderr
1186
1188
assert error_code == 0
Original file line number Diff line number Diff line change @@ -131,7 +131,9 @@ def test_iwdr_permutations(tmp_path_factory: Any) -> None:
131
131
)
132
132
assert err_code == 0
133
133
log = json .loads (stdout )["log" ]
134
- assert log ["checksum" ] == "sha1$bc51ebb3f65ca44282789dd1e6de9747d8abe75f" , log
134
+ with open (log .path ) as log_h :
135
+ log_text = log_h .read ()
136
+ assert log ["checksum" ] == "sha1$bc51ebb3f65ca44282789dd1e6de9747d8abe75f" , log_text
135
137
136
138
137
139
def test_iwdr_permutations_readonly (tmp_path_factory : Any ) -> None :
@@ -240,7 +242,9 @@ def test_iwdr_permutations_inplace(tmp_path_factory: Any) -> None:
240
242
)
241
243
assert err_code == 0
242
244
log = json .loads (stdout )["log" ]
243
- assert log ["checksum" ] == "sha1$bc51ebb3f65ca44282789dd1e6de9747d8abe75f" , log
245
+ with open (log .path ) as log_h :
246
+ log_text = log_h .read ()
247
+ assert log ["checksum" ] == "sha1$bc51ebb3f65ca44282789dd1e6de9747d8abe75f" , log_text
244
248
245
249
246
250
@needs_singularity
@@ -298,7 +302,9 @@ def test_iwdr_permutations_singularity(tmp_path_factory: Any) -> None:
298
302
)
299
303
assert err_code == 0
300
304
log = json .loads (stdout )["log" ]
301
- assert log ["checksum" ] == "sha1$bc51ebb3f65ca44282789dd1e6de9747d8abe75f" , log
305
+ with open (log .path ) as log_h :
306
+ log_text = log_h .read ()
307
+ assert log ["checksum" ] == "sha1$bc51ebb3f65ca44282789dd1e6de9747d8abe75f" , log_text
302
308
303
309
304
310
@needs_singularity
You can’t perform that action at this time.
0 commit comments