@@ -435,30 +435,29 @@ def test__close(self, m_read):
435435 def test__call_connection_lost (self ):
436436 tr = unix_events ._UnixReadPipeTransport (
437437 self .loop , self .pipe , self .protocol )
438+ self .assertIsNotNone (tr ._protocol )
439+ self .assertIsNotNone (tr ._loop )
438440
439441 err = None
440442 tr ._call_connection_lost (err )
441443 self .protocol .connection_lost .assert_called_with (err )
442444 self .pipe .close .assert_called_with ()
443445
444446 self .assertIsNone (tr ._protocol )
445- self .assertEqual (2 , sys .getrefcount (self .protocol ),
446- pprint .pformat (gc .get_referrers (self .protocol )))
447447 self .assertIsNone (tr ._loop )
448448
449449 def test__call_connection_lost_with_err (self ):
450450 tr = unix_events ._UnixReadPipeTransport (
451451 self .loop , self .pipe , self .protocol )
452+ self .assertIsNotNone (tr ._protocol )
453+ self .assertIsNotNone (tr ._loop )
452454
453455 err = OSError ()
454456 tr ._call_connection_lost (err )
455457 self .protocol .connection_lost .assert_called_with (err )
456458 self .pipe .close .assert_called_with ()
457459
458460 self .assertIsNone (tr ._protocol )
459-
460- self .assertEqual (2 , sys .getrefcount (self .protocol ),
461- pprint .pformat (gc .get_referrers (self .protocol )))
462461 self .assertIsNone (tr ._loop )
463462
464463
@@ -717,29 +716,29 @@ def test_abort(self, m_write):
717716 def test__call_connection_lost (self ):
718717 tr = unix_events ._UnixWritePipeTransport (
719718 self .loop , self .pipe , self .protocol )
719+ self .assertIsNotNone (tr ._protocol )
720+ self .assertIsNotNone (tr ._loop )
720721
721722 err = None
722723 tr ._call_connection_lost (err )
723724 self .protocol .connection_lost .assert_called_with (err )
724725 self .pipe .close .assert_called_with ()
725726
726727 self .assertIsNone (tr ._protocol )
727- self .assertEqual (2 , sys .getrefcount (self .protocol ),
728- pprint .pformat (gc .get_referrers (self .protocol )))
729728 self .assertIsNone (tr ._loop )
730729
731730 def test__call_connection_lost_with_err (self ):
732731 tr = unix_events ._UnixWritePipeTransport (
733732 self .loop , self .pipe , self .protocol )
733+ self .assertIsNotNone (tr ._protocol )
734+ self .assertIsNotNone (tr ._loop )
734735
735736 err = OSError ()
736737 tr ._call_connection_lost (err )
737738 self .protocol .connection_lost .assert_called_with (err )
738739 self .pipe .close .assert_called_with ()
739740
740741 self .assertIsNone (tr ._protocol )
741- self .assertEqual (2 , sys .getrefcount (self .protocol ),
742- pprint .pformat (gc .get_referrers (self .protocol )))
743742 self .assertIsNone (tr ._loop )
744743
745744 def test_close (self ):
0 commit comments