def test_mark_done_fault():
 group = worker.WalTransferGroup(FakeWalUploader())
 exp = Explosion('boom')
 seg = FakeWalSegment('arbitrary', mark_done_explosive=exp)
 group.start(seg)
 with pytest.raises(Explosion) as e:
  group.join()
 assert (e.value is exp)

def test_mark_done_fault ( ) : group = worker . WalTransferGroup ( FakeWalUploader ( ) ) exp = Explosion ( 'boom' ) seg = FakeWalSegment ( 'arbitrary' , mark_done_explosive = exp ) group . start ( seg ) with pytest . raises ( Explosion ) as e : group . join ( ) assert ( e . value is exp )
exercise exception handling from .