def test_simple_fail():
 group = worker.WalTransferGroup(FakeWalUploader())
 exp = Explosion('fail')
 seg = FakeWalSegment((('1' * 8) * 3), explicit=True, upload_explosive=exp)
 group.start(seg)
 with pytest.raises(Explosion) as e:
  group.join()
 assert (e.value is exp)
 assert failed(seg)

def test_simple_fail ( ) : group = worker . WalTransferGroup ( FakeWalUploader ( ) ) exp = Explosion ( 'fail' ) seg = FakeWalSegment ( ( ( '1' * 8 ) * 3 ) , explicit = True , upload_explosive = exp ) group . start ( seg ) with pytest . raises ( Explosion ) as e : group . join ( ) assert ( e . value is exp ) assert failed ( seg )
model a simple failure in the non-concurrent case .