@@ -5131,7 +5131,7 @@ def __init__(self, methodName='runTest'):
51315131
51325132 def _check_defaults (self , sock ):
51335133 self .assertIsInstance (sock , socket .socket )
5134- if hasattr (socket , 'AF_UNIX' ):
5134+ if sys . platform != 'win32' and hasattr (socket , 'AF_UNIX' ):
51355135 self .assertEqual (sock .family , socket .AF_UNIX )
51365136 else :
51375137 self .assertEqual (sock .family , socket .AF_INET )
@@ -6188,6 +6188,8 @@ def bind(self, sock, path):
61886188 else :
61896189 raise
61906190
6191+ @unittest .skipIf (sys .platform == 'win32' ,
6192+ 'Windows will raise Error if is not bound' )
61916193 def testUnbound (self ):
61926194 # Issue #30205 (note getsockname() can return None on OS X)
61936195 self .assertIn (self .sock .getsockname (), ('' , None ))
@@ -6227,6 +6229,8 @@ def testUnencodableAddr(self):
62276229
62286230 @unittest .skipIf (sys .platform in ('linux' , 'android' ),
62296231 'Linux behavior is tested by TestLinuxAbstractNamespace' )
6232+ @unittest .skipIf (sys .platform == 'win32' ,
6233+ 'Windows allow bind on empty path' )
62306234 def testEmptyAddress (self ):
62316235 # Test that binding empty address fails.
62326236 self .assertRaises (OSError , self .sock .bind , "" )
0 commit comments