@@ -435,30 +435,29 @@ def test__close(self, m_read):
435
435
def test__call_connection_lost (self ):
436
436
tr = unix_events ._UnixReadPipeTransport (
437
437
self .loop , self .pipe , self .protocol )
438
+ self .assertIsNotNone (tr ._protocol )
439
+ self .assertIsNotNone (tr ._loop )
438
440
439
441
err = None
440
442
tr ._call_connection_lost (err )
441
443
self .protocol .connection_lost .assert_called_with (err )
442
444
self .pipe .close .assert_called_with ()
443
445
444
446
self .assertIsNone (tr ._protocol )
445
- self .assertEqual (2 , sys .getrefcount (self .protocol ),
446
- pprint .pformat (gc .get_referrers (self .protocol )))
447
447
self .assertIsNone (tr ._loop )
448
448
449
449
def test__call_connection_lost_with_err (self ):
450
450
tr = unix_events ._UnixReadPipeTransport (
451
451
self .loop , self .pipe , self .protocol )
452
+ self .assertIsNotNone (tr ._protocol )
453
+ self .assertIsNotNone (tr ._loop )
452
454
453
455
err = OSError ()
454
456
tr ._call_connection_lost (err )
455
457
self .protocol .connection_lost .assert_called_with (err )
456
458
self .pipe .close .assert_called_with ()
457
459
458
460
self .assertIsNone (tr ._protocol )
459
-
460
- self .assertEqual (2 , sys .getrefcount (self .protocol ),
461
- pprint .pformat (gc .get_referrers (self .protocol )))
462
461
self .assertIsNone (tr ._loop )
463
462
464
463
@@ -717,29 +716,29 @@ def test_abort(self, m_write):
717
716
def test__call_connection_lost (self ):
718
717
tr = unix_events ._UnixWritePipeTransport (
719
718
self .loop , self .pipe , self .protocol )
719
+ self .assertIsNotNone (tr ._protocol )
720
+ self .assertIsNotNone (tr ._loop )
720
721
721
722
err = None
722
723
tr ._call_connection_lost (err )
723
724
self .protocol .connection_lost .assert_called_with (err )
724
725
self .pipe .close .assert_called_with ()
725
726
726
727
self .assertIsNone (tr ._protocol )
727
- self .assertEqual (2 , sys .getrefcount (self .protocol ),
728
- pprint .pformat (gc .get_referrers (self .protocol )))
729
728
self .assertIsNone (tr ._loop )
730
729
731
730
def test__call_connection_lost_with_err (self ):
732
731
tr = unix_events ._UnixWritePipeTransport (
733
732
self .loop , self .pipe , self .protocol )
733
+ self .assertIsNotNone (tr ._protocol )
734
+ self .assertIsNotNone (tr ._loop )
734
735
735
736
err = OSError ()
736
737
tr ._call_connection_lost (err )
737
738
self .protocol .connection_lost .assert_called_with (err )
738
739
self .pipe .close .assert_called_with ()
739
740
740
741
self .assertIsNone (tr ._protocol )
741
- self .assertEqual (2 , sys .getrefcount (self .protocol ),
742
- pprint .pformat (gc .get_referrers (self .protocol )))
743
742
self .assertIsNone (tr ._loop )
744
743
745
744
def test_close (self ):
0 commit comments