@@ -1717,6 +1717,8 @@ def test_str_for_enums(self):
1717
1717
self .assertEqual (str (s .family ), 'AddressFamily.AF_INET' )
1718
1718
self .assertEqual (str (s .type ), 'SocketKind.SOCK_STREAM' )
1719
1719
1720
+ # TODO: RUSTPYTHON, AssertionError: 526337 != <SocketKind.SOCK_STREAM: 1>
1721
+ @unittest .expectedFailure
1720
1722
def test_socket_consistent_sock_type (self ):
1721
1723
SOCK_NONBLOCK = getattr (socket , 'SOCK_NONBLOCK' , 0 )
1722
1724
SOCK_CLOEXEC = getattr (socket , 'SOCK_CLOEXEC' , 0 )
@@ -1873,6 +1875,8 @@ def testCrucialConstants(self):
1873
1875
1874
1876
@unittest .skipUnless (hasattr (socket , "CAN_BCM" ),
1875
1877
'socket.CAN_BCM required for this test.' )
1878
+ # TODO: RUSTPYTHON, AttributeError: module 'socket' has no attribute 'CAN_BCM_TX_SETUP'
1879
+ @unittest .expectedFailure
1876
1880
def testBCMConstants (self ):
1877
1881
socket .CAN_BCM
1878
1882
@@ -1913,12 +1917,16 @@ def testCreateBCMSocket(self):
1913
1917
with socket .socket (socket .PF_CAN , socket .SOCK_DGRAM , socket .CAN_BCM ) as s :
1914
1918
pass
1915
1919
1920
+ # TODO: RUSTPYTHON, OSError: bind(): bad family
1921
+ @unittest .expectedFailure
1916
1922
def testBindAny (self ):
1917
1923
with socket .socket (socket .PF_CAN , socket .SOCK_RAW , socket .CAN_RAW ) as s :
1918
1924
address = ('' , )
1919
1925
s .bind (address )
1920
1926
self .assertEqual (s .getsockname (), address )
1921
1927
1928
+ # TODO: RUSTPYTHON, AssertionError: "interface name too long" does not match "bind(): bad family"
1929
+ @unittest .expectedFailure
1922
1930
def testTooLongInterfaceName (self ):
1923
1931
# most systems limit IFNAMSIZ to 16, take 1024 to be sure
1924
1932
with socket .socket (socket .PF_CAN , socket .SOCK_RAW , socket .CAN_RAW ) as s :
@@ -4377,6 +4385,8 @@ def testSetBlocking_overflow(self):
4377
4385
@unittest .skipUnless (hasattr (socket , 'SOCK_NONBLOCK' ),
4378
4386
'test needs socket.SOCK_NONBLOCK' )
4379
4387
@support .requires_linux_version (2 , 6 , 28 )
4388
+ # TODO: RUSTPYTHON, AssertionError: None != 0
4389
+ @unittest .expectedFailure
4380
4390
def testInitNonBlocking (self ):
4381
4391
# create a socket with SOCK_NONBLOCK
4382
4392
self .serv .close ()
@@ -5395,6 +5405,8 @@ class InheritanceTest(unittest.TestCase):
5395
5405
@unittest .skipUnless (hasattr (socket , "SOCK_CLOEXEC" ),
5396
5406
"SOCK_CLOEXEC not defined" )
5397
5407
@support .requires_linux_version (2 , 6 , 28 )
5408
+ # TODO: RUSTPYTHON, AssertionError: 524289 != <SocketKind.SOCK_STREAM: 1>
5409
+ @unittest .expectedFailure
5398
5410
def test_SOCK_CLOEXEC (self ):
5399
5411
with socket .socket (socket .AF_INET ,
5400
5412
socket .SOCK_STREAM | socket .SOCK_CLOEXEC ) as s :
@@ -5487,6 +5499,8 @@ def checkNonblock(self, s, nonblock=True, timeout=0.0):
5487
5499
self .assertTrue (s .getblocking ())
5488
5500
5489
5501
@support .requires_linux_version (2 , 6 , 28 )
5502
+ # TODO: RUSTPYTHON, AssertionError: 2049 != <SocketKind.SOCK_STREAM: 1>
5503
+ @unittest .expectedFailure
5490
5504
def test_SOCK_NONBLOCK (self ):
5491
5505
# a lot of it seems silly and redundant, but I wanted to test that
5492
5506
# changing back and forth worked ok
@@ -5910,6 +5924,8 @@ def create_alg(self, typ, name):
5910
5924
# bpo-31705: On kernel older than 4.5, sendto() failed with ENOKEY,
5911
5925
# at least on ppc64le architecture
5912
5926
@support .requires_linux_version (4 , 5 )
5927
+ # TODO: RUSTPYTHON, OSError: bind(): bad family
5928
+ @unittest .expectedFailure
5913
5929
def test_sha256 (self ):
5914
5930
expected = bytes .fromhex ("ba7816bf8f01cfea414140de5dae2223b00361a396"
5915
5931
"177a9cb410ff61f20015ad" )
@@ -5927,6 +5943,8 @@ def test_sha256(self):
5927
5943
op .send (b'' )
5928
5944
self .assertEqual (op .recv (512 ), expected )
5929
5945
5946
+ # TODO: RUSTPYTHON, OSError: bind(): bad family
5947
+ @unittest .expectedFailure
5930
5948
def test_hmac_sha1 (self ):
5931
5949
expected = bytes .fromhex ("effcdf6ae5eb2fa2d27416d5f184df9c259a7c79" )
5932
5950
with self .create_alg ('hash' , 'hmac(sha1)' ) as algo :
@@ -5939,6 +5957,8 @@ def test_hmac_sha1(self):
5939
5957
# Although it should work with 3.19 and newer the test blocks on
5940
5958
# Ubuntu 15.10 with Kernel 4.2.0-19.
5941
5959
@support .requires_linux_version (4 , 3 )
5960
+ # TODO: RUSTPYTHON, OSError: bind(): bad family
5961
+ @unittest .expectedFailure
5942
5962
def test_aes_cbc (self ):
5943
5963
key = bytes .fromhex ('06a9214036b8a15b512e03d534120006' )
5944
5964
iv = bytes .fromhex ('3dafba429d9eb430b422da802c9fac41' )
@@ -5980,6 +6000,8 @@ def test_aes_cbc(self):
5980
6000
self .assertEqual (dec , msg * multiplier )
5981
6001
5982
6002
@support .requires_linux_version (4 , 9 ) # see issue29324
6003
+ # TODO: RUSTPYTHON, OSError: bind(): bad family
6004
+ @unittest .expectedFailure
5983
6005
def test_aead_aes_gcm (self ):
5984
6006
key = bytes .fromhex ('c939cc13397c1d37de6ae0e1cb7c423c' )
5985
6007
iv = bytes .fromhex ('b3d8cc017cbb89b39e0f67e2' )
@@ -6043,6 +6065,8 @@ def test_aead_aes_gcm(self):
6043
6065
self .assertEqual (plain , res [assoclen :])
6044
6066
6045
6067
@support .requires_linux_version (4 , 3 ) # see test_aes_cbc
6068
+ # TODO: RUSTPYTHON, OSError: bind(): bad family
6069
+ @unittest .expectedFailure
6046
6070
def test_drbg_pr_sha256 (self ):
6047
6071
# deterministic random bit generator, prediction resistance, sha256
6048
6072
with self .create_alg ('rng' , 'drbg_pr_sha256' ) as algo :
@@ -6053,6 +6077,8 @@ def test_drbg_pr_sha256(self):
6053
6077
rn = op .recv (32 )
6054
6078
self .assertEqual (len (rn ), 32 )
6055
6079
6080
+ # TODO: RUSTPYTHON, AttributeError: 'socket' object has no attribute 'sendmsg_afalg'
6081
+ @unittest .expectedFailure
6056
6082
def test_sendmsg_afalg_args (self ):
6057
6083
sock = socket .socket (socket .AF_ALG , socket .SOCK_SEQPACKET , 0 )
6058
6084
with sock :
@@ -6071,6 +6097,8 @@ def test_sendmsg_afalg_args(self):
6071
6097
with self .assertRaises (TypeError ):
6072
6098
sock .sendmsg_afalg (op = socket .ALG_OP_ENCRYPT , assoclen = - 1 )
6073
6099
6100
+ # TODO: RUSTPYTHON, OSError: bind(): bad family
6101
+ @unittest .expectedFailure
6074
6102
def test_length_restriction (self ):
6075
6103
# bpo-35050, off-by-one error in length check
6076
6104
sock = socket .socket (socket .AF_ALG , socket .SOCK_SEQPACKET , 0 )
0 commit comments