New Paste

 

Recent Pastes

Administrate




Pastebin on p.luis.im

PasteID: 5wp
Pasted by Anonymous, 2019-11-16 09:51:02 GMT
Expires Never
Paste size 3.04 Kb
Tools Raw   Download
 
  1. ================================================================================================================= FAILURES ==================================================================================================================  
  2. ___________________________________________________________________________________________________________ TestPeer.test_payment ___________________________________________________________________________________________________________  
  3.   
  4. self = <electrum.tests.test_lnpeer.TestPeer testMethod=test_payment>  
  5.   
  6.     def test_payment(self):  
  7.         p1, p2, w1, w2, _q1, _q2 = self.prepare_peers()  
  8.         pay_req = self.prepare_invoice(w2)  
  9.         async def pay():  
  10.             result = await LNWallet._pay(w1, pay_req)  
  11.             self.assertEqual(result, True)  
  12.             gath.cancel()  
  13.         gath = asyncio.gather(pay(), p1._message_loop(), p2._message_loop())  
  14.         async def f():  
  15.             await gath  
  16.         with self.assertRaises(asyncio.CancelledError):  
  17. >           run(f())  
  18.   
  19. electrum/tests/test_lnpeer.py:242:   
  20. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  
  21. electrum/tests/test_lnpeer.py:267: in run  
  22.     return asyncio.run_coroutine_threadsafe(coro, loop=asyncio.get_event_loop()).result()  
  23. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  
  24.   
  25.     def result(self, timeout=None):  
  26.         """Return the result of the call that the future represents.  
  27.       
  28.         Args:  
  29.             timeout: The number of seconds to wait for the result if the future  
  30.                 isn't done. If None, then there is no limit on the wait time.  
  31.       
  32.         Returns:  
  33.             The result of the call that the future represents.  
  34.       
  35.         Raises:  
  36.             CancelledError: If the future was cancelled.  
  37.             TimeoutError: If the future didn't finish executing before the given  
  38.                 timeout.  
  39.             Exception: If the call raised then that exception will be raised.  
  40.         """  
  41.         with self._condition:  
  42.             if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:  
  43.                 raise CancelledError()  
  44.             elif self._state == FINISHED:  
  45.                 return self.__get_result()  
  46.       
  47.             self._condition.wait(timeout)  
  48.       
  49.             if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:  
  50. >               raise CancelledError()  
  51. E               concurrent.futures._base.CancelledError  
  52.   
  53. /usr/lib64/python3.8/concurrent/futures/_base.py:437: CancelledError  
  54. ----------------------------------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------------------------------  
  55.  
 
 
 
 
Written by Xan Manning, 2010.