Skip to content

Commit 5e56905

Browse files
committed
exclude subprocess mocks from coverage
1 parent 286f38a commit 5e56905

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/unit/test_transfer_manager.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@
3535
CHUNK_SIZE = 8
3636

3737

38+
# Used in subprocesses only, so excluded from coverage
3839
def _validate_blob_token_in_subprocess(
3940
maybe_pickled_blob, method_name, path_or_file, **kwargs
40-
):
41+
): # pragma: no cover
4142
assert pickle.loads(maybe_pickled_blob) == BLOB_TOKEN_STRING
4243
assert method_name.endswith("filename")
4344
assert path_or_file.startswith("file")
@@ -619,9 +620,10 @@ def download_to_file(self, *args, **kwargs):
619620
return "SUCCESS"
620621

621622

623+
# Used in subprocesses only, so excluded from coverage
622624
def _validate_blob_token_in_subprocess_for_chunk(
623625
maybe_pickled_blob, filename, **kwargs
624-
):
626+
): # pragma: no cover
625627
blob = pickle.loads(maybe_pickled_blob)
626628
assert isinstance(blob, _PickleableMockBlob)
627629
assert filename.startswith("file")

0 commit comments

Comments
 (0)