MCPcopy Create free account
hub / github.com/wal-e/wal-e / indeterminate

Function indeterminate

tests/test_wal_transfer.py:63–79  ·  view source on GitHub ↗

Returns true as long as the segment is internally consistent. Checks invariants of mark_done, depending on whether the segment has been uploaded. This is useful in cases with tests with failures and concurrent execution, and calls out the state of the segment in any case to the rea

(seg)

Source from the content-addressed store, hash-verified

61
62
63def indeterminate(seg):
64 """Returns true as long as the segment is internally consistent.
65
66 Checks invariants of mark_done, depending on whether the segment
67 has been uploaded. This is useful in cases with tests with
68 failures and concurrent execution, and calls out the state of the
69 segment in any case to the reader.
70 """
71 if seg._uploaded:
72 if seg.explicit:
73 assert seg._marked is False
74 else:
75 assert seg._marked is True
76 else:
77 assert seg._marked is False
78
79 return True
80
81
82def prepare_multi_upload_segments():

Callers 1

test_multi_pipeline_failFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected