@ -302,7 +302,7 @@ class SquareGraph(NamedTuple):
class PaymentDone ( Exception ) : pass
class PaymentDone ( Exception ) : pass
class Test Success( Exception ) : pass
class SuccessfulTest ( Exception ) : pass
class TestPeer ( TestCaseForTestnet ) :
class TestPeer ( TestCaseForTestnet ) :
@ -936,7 +936,7 @@ class TestPeer(TestCaseForTestnet):
# Dave is supposed to have failed the pending incomplete MPP HTLCs
# Dave is supposed to have failed the pending incomplete MPP HTLCs
self . assertEqual ( 0 , len ( graph . chan_dc . hm . htlcs ( LOCAL ) ) )
self . assertEqual ( 0 , len ( graph . chan_dc . hm . htlcs ( LOCAL ) ) )
self . assertEqual ( 0 , len ( graph . chan_dc . hm . htlcs ( REMOTE ) ) )
self . assertEqual ( 0 , len ( graph . chan_dc . hm . htlcs ( REMOTE ) ) )
raise Test Success( )
raise SuccessfulTest ( )
async def f ( ) :
async def f ( ) :
async with TaskGroup ( ) as group :
async with TaskGroup ( ) as group :
@ -946,7 +946,7 @@ class TestPeer(TestCaseForTestnet):
await asyncio . sleep ( 0.2 )
await asyncio . sleep ( 0.2 )
await group . spawn ( pay ( ) )
await group . spawn ( pay ( ) )
with self . assertRaises ( Test Success) :
with self . assertRaises ( SuccessfulTest ) :
run ( f ( ) )
run ( f ( ) )
@needs_test_with_all_chacha20_implementations
@needs_test_with_all_chacha20_implementations
@ -1106,7 +1106,7 @@ class TestPeer(TestCaseForTestnet):
raw_msg2 = ( 43333 ) . to_bytes ( length = 2 , byteorder = " big " ) + bytes ( range ( 55 ) )
raw_msg2 = ( 43333 ) . to_bytes ( length = 2 , byteorder = " big " ) + bytes ( range ( 55 ) )
p1 . transport . send_bytes ( raw_msg2 )
p1 . transport . send_bytes ( raw_msg2 )
await asyncio . sleep ( 0.05 )
await asyncio . sleep ( 0.05 )
raise Test Success( )
raise SuccessfulTest ( )
async def f ( ) :
async def f ( ) :
async with TaskGroup ( ) as group :
async with TaskGroup ( ) as group :
@ -1116,7 +1116,7 @@ class TestPeer(TestCaseForTestnet):
await asyncio . sleep ( 0.2 )
await asyncio . sleep ( 0.2 )
await group . spawn ( send_weird_messages ( ) )
await group . spawn ( send_weird_messages ( ) )
with self . assertRaises ( Test Success) :
with self . assertRaises ( SuccessfulTest ) :
run ( f ( ) )
run ( f ( ) )
@needs_test_with_all_chacha20_implementations
@needs_test_with_all_chacha20_implementations