File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1618,7 +1618,7 @@ def test_socket_consistent_sock_type(self):
1618
1618
self .assertEqual (s .type , socket .SOCK_STREAM )
1619
1619
1620
1620
@unittest .skipIf (os .name == 'nt' , 'Will not work on Windows' )
1621
- def test_uknown_socket_family_repr (self ):
1621
+ def test_unknown_socket_family_repr (self ):
1622
1622
# Test that when created with a family that's not one of the known
1623
1623
# AF_*/SOCK_* constants, socket.family just returns the number.
1624
1624
#
@@ -1642,7 +1642,8 @@ def test_uknown_socket_family_repr(self):
1642
1642
fileno = fd ) as s :
1643
1643
self .assertEqual (s .family , unknown_family )
1644
1644
self .assertEqual (s .type , unknown_type )
1645
- self .assertEqual (s .proto , 23 )
1645
+ # some OS like macOS ignore proto
1646
+ self .assertIn (s .proto , {0 , 23 })
1646
1647
1647
1648
@unittest .skipUnless (hasattr (os , 'sendfile' ), 'test needs os.sendfile()' )
1648
1649
def test__sendfile_use_sendfile (self ):
You can’t perform that action at this time.
0 commit comments