File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Tests/modules/network_related Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -533,14 +533,14 @@ def test_misc(self):
533533 def test_makefile_refcount (self ):
534534 "Ensures that the _socket stays open while there's still a file associated"
535535
536- GPORT = None
536+ PORT = None
537537 def echoer ():
538- nonlocal GPORT
538+ nonlocal PORT
539539 s = socket .socket ()
540540 s .settimeout (15 ) # prevents the server from staying open if the client never connects
541541 s .bind (('localhost' , 0 ))
542542 s .listen (5 )
543- GPORT = s .getsockname ()[1 ]
543+ PORT = s .getsockname ()[1 ]
544544 (s2 , _ ) = s .accept ()
545545 s2 .send (s2 .recv (10 ))
546546 s2 .close ()
@@ -549,7 +549,7 @@ def echoer():
549549 _thread .start_new_thread (echoer , ())
550550 for _ in range (20 ):
551551 time .sleep (0.5 )
552- if GPORT is not None :
552+ if PORT is not None :
553553 break
554554
555555 if is_mono :
@@ -558,7 +558,7 @@ def echoer():
558558 s = socket .socket ()
559559 if is_mono :
560560 dummy .close ()
561- s .connect (('localhost' , GPORT ))
561+ s .connect (('localhost' , PORT ))
562562 f1 = s .makefile ('r' )
563563 f2 = s .makefile ('w' )
564564 s .close ()
You can’t perform that action at this time.
0 commit comments