File tree 1 file changed +0
-37
lines changed
1 file changed +0
-37
lines changed Original file line number Diff line number Diff line change @@ -652,43 +652,6 @@ async def runner():
652
652
self .assertIsNone (
653
653
self .loop .run_until_complete (connection_lost_called ))
654
654
655
- def test_context_run_segfault (self ):
656
- is_new = False
657
- done = self .loop .create_future ()
658
-
659
- def server (sock ):
660
- sock .sendall (b'hello' )
661
-
662
- class Protocol (asyncio .Protocol ):
663
- def __init__ (self ):
664
- self .transport = None
665
-
666
- def connection_made (self , transport ):
667
- self .transport = transport
668
-
669
- def data_received (self , data ):
670
- try :
671
- self = weakref .ref (self )
672
- nonlocal is_new
673
- if is_new :
674
- done .set_result (data )
675
- else :
676
- is_new = True
677
- new_proto = Protocol ()
678
- self ().transport .set_protocol (new_proto )
679
- new_proto .connection_made (self ().transport )
680
- new_proto .data_received (data )
681
- except Exception as e :
682
- done .set_exception (e )
683
-
684
- async def test (addr ):
685
- await self .loop .create_connection (Protocol , * addr )
686
- data = await done
687
- self .assertEqual (data , b'hello' )
688
-
689
- with self .tcp_server (server ) as srv :
690
- self .loop .run_until_complete (test (srv .addr ))
691
-
692
655
693
656
class Test_UV_TCP (_TestTCP , tb .UVTestCase ):
694
657
You can’t perform that action at this time.
0 commit comments