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

Function test_atomic_download_failure

tests/test_prefetch.py:57–68  ·  view source on GitHub ↗

Ensure a raised exception doesn't move WAL into place

(pd, seg)

Source from the content-addressed store, hash-verified

55
56
57def test_atomic_download_failure(pd, seg):
58 "Ensure a raised exception doesn't move WAL into place"
59 pd.create(seg)
60 e = Exception('Anything')
61
62 with pytest.raises(Exception) as err:
63 with pd.download(seg):
64 raise e
65
66 assert err.value is e
67 assert not pd.is_running(seg)
68 assert not pd.contains(seg)
69
70
71def test_cleanup_running(pd, seg):

Callers

nothing calls this directly

Calls 4

downloadMethod · 0.80
is_runningMethod · 0.80
containsMethod · 0.80
createMethod · 0.45

Tested by

no test coverage detected