def test_no_retry_on_keyboadinterrupt(collect):
 key_name = 'test-key-name'
 b = B(name=key_name)
 class MarkedKeyboardInterrupt(KeyboardInterrupt, ):
  pass
 collect.inject(MarkedKeyboardInterrupt('SIGINT, probably'))
 d = wabs_deleter.Deleter(BlobService('test', 'ing'), 'test-container')
 with pytest.raises(MarkedKeyboardInterrupt):
  d.delete(b)
  while True:
   gevent.sleep(0.1)
 assert (collect.aborted_keys == [key_name])
 collect.inject(None)
 d.close()
 assert (not collect.deleted_keys)

def test_no_retry_on_keyboadinterrupt ( collect ) : key_name = 'test-key-name' b = B ( name = key_name ) class MarkedKeyboardInterrupt ( KeyboardInterrupt , ) : pass collect . inject ( MarkedKeyboardInterrupt ( 'SIGINT, probably' ) ) d = wabs_deleter . Deleter ( BlobService ( 'test' , 'ing' ) , 'test-container' ) with pytest . raises ( MarkedKeyboardInterrupt ) : d . delete ( b ) while True : gevent . sleep ( 0.1 ) assert ( collect . aborted_keys == [ key_name ] ) collect . inject ( None ) d . close ( ) assert ( not collect . deleted_keys )
ensure that keyboardinterrupts are forwarded .