Skip to content

Commit 92f790e

Browse files
committed
Mark erroring/failing tests
1 parent 97db885 commit 92f790e

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Lib/test/test_socket.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,6 +1717,8 @@ def test_str_for_enums(self):
17171717
self.assertEqual(str(s.family), 'AddressFamily.AF_INET')
17181718
self.assertEqual(str(s.type), 'SocketKind.SOCK_STREAM')
17191719

1720+
# TODO: RUSTPYTHON, AssertionError: 526337 != <SocketKind.SOCK_STREAM: 1>
1721+
@unittest.expectedFailure
17201722
def test_socket_consistent_sock_type(self):
17211723
SOCK_NONBLOCK = getattr(socket, 'SOCK_NONBLOCK', 0)
17221724
SOCK_CLOEXEC = getattr(socket, 'SOCK_CLOEXEC', 0)
@@ -1873,6 +1875,8 @@ def testCrucialConstants(self):
18731875

18741876
@unittest.skipUnless(hasattr(socket, "CAN_BCM"),
18751877
'socket.CAN_BCM required for this test.')
1878+
# TODO: RUSTPYTHON, AttributeError: module 'socket' has no attribute 'CAN_BCM_TX_SETUP'
1879+
@unittest.expectedFailure
18761880
def testBCMConstants(self):
18771881
socket.CAN_BCM
18781882

@@ -1913,12 +1917,16 @@ def testCreateBCMSocket(self):
19131917
with socket.socket(socket.PF_CAN, socket.SOCK_DGRAM, socket.CAN_BCM) as s:
19141918
pass
19151919

1920+
# TODO: RUSTPYTHON, OSError: bind(): bad family
1921+
@unittest.expectedFailure
19161922
def testBindAny(self):
19171923
with socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) as s:
19181924
address = ('', )
19191925
s.bind(address)
19201926
self.assertEqual(s.getsockname(), address)
19211927

1928+
# TODO: RUSTPYTHON, AssertionError: "interface name too long" does not match "bind(): bad family"
1929+
@unittest.expectedFailure
19221930
def testTooLongInterfaceName(self):
19231931
# most systems limit IFNAMSIZ to 16, take 1024 to be sure
19241932
with socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) as s:
@@ -4377,6 +4385,8 @@ def testSetBlocking_overflow(self):
43774385
@unittest.skipUnless(hasattr(socket, 'SOCK_NONBLOCK'),
43784386
'test needs socket.SOCK_NONBLOCK')
43794387
@support.requires_linux_version(2, 6, 28)
4388+
# TODO: RUSTPYTHON, AssertionError: None != 0
4389+
@unittest.expectedFailure
43804390
def testInitNonBlocking(self):
43814391
# create a socket with SOCK_NONBLOCK
43824392
self.serv.close()
@@ -5395,6 +5405,8 @@ class InheritanceTest(unittest.TestCase):
53955405
@unittest.skipUnless(hasattr(socket, "SOCK_CLOEXEC"),
53965406
"SOCK_CLOEXEC not defined")
53975407
@support.requires_linux_version(2, 6, 28)
5408+
# TODO: RUSTPYTHON, AssertionError: 524289 != <SocketKind.SOCK_STREAM: 1>
5409+
@unittest.expectedFailure
53985410
def test_SOCK_CLOEXEC(self):
53995411
with socket.socket(socket.AF_INET,
54005412
socket.SOCK_STREAM | socket.SOCK_CLOEXEC) as s:
@@ -5487,6 +5499,8 @@ def checkNonblock(self, s, nonblock=True, timeout=0.0):
54875499
self.assertTrue(s.getblocking())
54885500

54895501
@support.requires_linux_version(2, 6, 28)
5502+
# TODO: RUSTPYTHON, AssertionError: 2049 != <SocketKind.SOCK_STREAM: 1>
5503+
@unittest.expectedFailure
54905504
def test_SOCK_NONBLOCK(self):
54915505
# a lot of it seems silly and redundant, but I wanted to test that
54925506
# changing back and forth worked ok
@@ -5910,6 +5924,8 @@ def create_alg(self, typ, name):
59105924
# bpo-31705: On kernel older than 4.5, sendto() failed with ENOKEY,
59115925
# at least on ppc64le architecture
59125926
@support.requires_linux_version(4, 5)
5927+
# TODO: RUSTPYTHON, OSError: bind(): bad family
5928+
@unittest.expectedFailure
59135929
def test_sha256(self):
59145930
expected = bytes.fromhex("ba7816bf8f01cfea414140de5dae2223b00361a396"
59155931
"177a9cb410ff61f20015ad")
@@ -5927,6 +5943,8 @@ def test_sha256(self):
59275943
op.send(b'')
59285944
self.assertEqual(op.recv(512), expected)
59295945

5946+
# TODO: RUSTPYTHON, OSError: bind(): bad family
5947+
@unittest.expectedFailure
59305948
def test_hmac_sha1(self):
59315949
expected = bytes.fromhex("effcdf6ae5eb2fa2d27416d5f184df9c259a7c79")
59325950
with self.create_alg('hash', 'hmac(sha1)') as algo:
@@ -5939,6 +5957,8 @@ def test_hmac_sha1(self):
59395957
# Although it should work with 3.19 and newer the test blocks on
59405958
# Ubuntu 15.10 with Kernel 4.2.0-19.
59415959
@support.requires_linux_version(4, 3)
5960+
# TODO: RUSTPYTHON, OSError: bind(): bad family
5961+
@unittest.expectedFailure
59425962
def test_aes_cbc(self):
59435963
key = bytes.fromhex('06a9214036b8a15b512e03d534120006')
59445964
iv = bytes.fromhex('3dafba429d9eb430b422da802c9fac41')
@@ -5980,6 +6000,8 @@ def test_aes_cbc(self):
59806000
self.assertEqual(dec, msg * multiplier)
59816001

59826002
@support.requires_linux_version(4, 9) # see issue29324
6003+
# TODO: RUSTPYTHON, OSError: bind(): bad family
6004+
@unittest.expectedFailure
59836005
def test_aead_aes_gcm(self):
59846006
key = bytes.fromhex('c939cc13397c1d37de6ae0e1cb7c423c')
59856007
iv = bytes.fromhex('b3d8cc017cbb89b39e0f67e2')
@@ -6043,6 +6065,8 @@ def test_aead_aes_gcm(self):
60436065
self.assertEqual(plain, res[assoclen:])
60446066

60456067
@support.requires_linux_version(4, 3) # see test_aes_cbc
6068+
# TODO: RUSTPYTHON, OSError: bind(): bad family
6069+
@unittest.expectedFailure
60466070
def test_drbg_pr_sha256(self):
60476071
# deterministic random bit generator, prediction resistance, sha256
60486072
with self.create_alg('rng', 'drbg_pr_sha256') as algo:
@@ -6053,6 +6077,8 @@ def test_drbg_pr_sha256(self):
60536077
rn = op.recv(32)
60546078
self.assertEqual(len(rn), 32)
60556079

6080+
# TODO: RUSTPYTHON, AttributeError: 'socket' object has no attribute 'sendmsg_afalg'
6081+
@unittest.expectedFailure
60566082
def test_sendmsg_afalg_args(self):
60576083
sock = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0)
60586084
with sock:
@@ -6071,6 +6097,8 @@ def test_sendmsg_afalg_args(self):
60716097
with self.assertRaises(TypeError):
60726098
sock.sendmsg_afalg(op=socket.ALG_OP_ENCRYPT, assoclen=-1)
60736099

6100+
# TODO: RUSTPYTHON, OSError: bind(): bad family
6101+
@unittest.expectedFailure
60746102
def test_length_restriction(self):
60756103
# bpo-35050, off-by-one error in length check
60766104
sock = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0)

0 commit comments

Comments
 (0)