Skip to content

Commit fe90bee

Browse files
committed
Changed all skips to expecetedFailures + Removed all skips due to CPython specific tests
1 parent f3cc1a5 commit fe90bee

File tree

8 files changed

+45
-40
lines changed

8 files changed

+45
-40
lines changed

Lib/test/test_asyncio/test_base_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,7 @@ def test_create_connection_no_inet_pton(self, m_socket):
15011501
support.is_android and platform.android_ver().api_level < 23,
15021502
"Issue gh-71123: this fails on Android before API level 23"
15031503
)
1504-
@unittest.skip('TODO: RUSTPYTHON; TypeError: unexpected type bytes')
1504+
@unittest.expectedFailure # TODO: RUSTPYTHON; TypeError: unexpected type bytes
15051505
def test_create_connection_service_name(self, m_socket):
15061506
m_socket.getaddrinfo = socket.getaddrinfo
15071507
sock = m_socket.socket.return_value

Lib/test/test_asyncio/test_eager_task_factory.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ class PyEagerTaskFactoryLoopTests(EagerTaskFactoryLoopTests, test_utils.TestCase
269269
Task = tasks._PyTask
270270

271271

272-
@unittest.skip('TODO: RUSTPYTHON: CPython specific test')
272+
# TODO: RUSTPYTHON: CPython specific test
273273
@unittest.skipUnless(hasattr(tasks, '_CTask'),
274274
'requires the C _asyncio module')
275275
class CEagerTaskFactoryLoopTests(EagerTaskFactoryLoopTests, test_utils.TestCase):
@@ -416,13 +416,13 @@ class NonEagerPyTaskTests(BaseNonEagerTaskFactoryTests, test_utils.TestCase):
416416
class EagerPyTaskTests(BaseEagerTaskFactoryTests, test_utils.TestCase):
417417
Task = tasks._PyTask
418418

419-
@unittest.skip('TODO: RUSTPYTHON: CPython specific test')
419+
# TODO: RUSTPYTHON: CPython specific test
420420
@unittest.skipUnless(hasattr(tasks, '_CTask'),
421421
'requires the C _asyncio module')
422422
class NonEagerCTaskTests(BaseNonEagerTaskFactoryTests, test_utils.TestCase):
423423
Task = getattr(tasks, '_CTask', None)
424424

425-
@unittest.skip('TODO: RUSTPYTHON: CPython specific test')
425+
# TODO: RUSTPYTHON: CPython specific test
426426
@unittest.skipUnless(hasattr(tasks, '_CTask'),
427427
'requires the C _asyncio module')
428428
class EagerCTaskTests(BaseEagerTaskFactoryTests, test_utils.TestCase):

Lib/test/test_asyncio/test_events.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,8 @@ def writer(data):
444444
r.close()
445445
self.assertEqual(read, data)
446446

447+
@unittest.expectedFailure # TODO: RUSTPYTHON; OSError: Failed to set signal
447448
@unittest.skipUnless(hasattr(signal, 'SIGKILL'), 'No SIGKILL')
448-
@unittest.skip('TODO: RUSTPYTHON; OSError: Failed to set signal')
449449
def test_add_signal_handler(self):
450450
caught = 0
451451

@@ -1172,8 +1172,8 @@ def test_create_unix_server_ssl_verified(self):
11721172
server.close()
11731173
self.loop.run_until_complete(proto.done)
11741174

1175-
@unittest.skipIf(ssl is None, 'No ssl module')
11761175
@unittest.expectedFailure # TODO: RUSTPYTHON AssertionError: {'OCSP': ('http://testca.pythontest.net/tes[629 chars]': 3} != {'subject': ((('countryName', ''),), (('loc[419 chars]'),)}
1176+
@unittest.skipIf(ssl is None, 'No ssl module')
11771177
def test_create_server_ssl_verified(self):
11781178
proto = MyProto(loop=self.loop)
11791179
server, host, port = self._make_ssl_server(

Lib/test/test_asyncio/test_futures.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ def __del__(self):
678678
fut = self._new_future(loop=self.loop)
679679
fut.set_result(Evil())
680680

681-
@unittest.skip('TODO: RUSTPYTHON; NotImplementedError')
681+
@unittest.expectedFailure # TODO: RUSTPYTHON; NotImplementedError
682682
def test_future_cancelled_result_refcycles(self):
683683
f = self._new_future(loop=self.loop)
684684
f.cancel()
@@ -690,7 +690,7 @@ def test_future_cancelled_result_refcycles(self):
690690
self.assertIsNotNone(exc)
691691
self.assertListEqual(gc.get_referrers(exc), [])
692692

693-
@unittest.skip('TODO: RUSTPYTHON; NotImplementedError')
693+
@unittest.expectedFailure # TODO: RUSTPYTHON; NotImplementedError
694694
def test_future_cancelled_exception_refcycles(self):
695695
f = self._new_future(loop=self.loop)
696696
f.cancel()
@@ -702,7 +702,7 @@ def test_future_cancelled_exception_refcycles(self):
702702
self.assertIsNotNone(exc)
703703
self.assertListEqual(gc.get_referrers(exc), [])
704704

705-
@unittest.skip('TODO: RUSTPYTHON: CPython specific test')
705+
# TODO: RUSTPYTHON: CPython specific test
706706
@unittest.skipUnless(hasattr(futures, '_CFuture'),
707707
'requires the C _asyncio module')
708708
class CFutureTests(BaseFutureTests, test_utils.TestCase):
@@ -744,7 +744,7 @@ def test_callbacks_copy(self):
744744
fut.remove_done_callback(f2)
745745
self.assertIsNone(fut._callbacks)
746746

747-
@unittest.skip('TODO: RUSTPYTHON: CPython specific test')
747+
# TODO: RUSTPYTHON: CPython specific test
748748
@unittest.skipUnless(hasattr(futures, '_CFuture'),
749749
'requires the C _asyncio module')
750750
class CSubFutureTests(BaseFutureTests, test_utils.TestCase):
@@ -1077,7 +1077,7 @@ def __getattribute__(self, name):
10771077
del fut_callback_0
10781078
self.assertRaises(ReachableCode, fut.set_result, "boom")
10791079

1080-
@unittest.skip('TODO: RUSTPYTHON: CPython specific test')
1080+
# TODO: RUSTPYTHON: CPython specific test
10811081
@unittest.skipUnless(hasattr(futures, '_CFuture'),
10821082
'requires the C _asyncio module')
10831083
class CFutureDoneCallbackTests(BaseFutureDoneCallbackTests,
@@ -1086,7 +1086,7 @@ class CFutureDoneCallbackTests(BaseFutureDoneCallbackTests,
10861086
def _new_future(self):
10871087
return futures._CFuture(loop=self.loop)
10881088

1089-
@unittest.skip('TODO: RUSTPYTHON: CPython specific test')
1089+
# TODO: RUSTPYTHON: CPython specific test
10901090
@unittest.skipUnless(hasattr(futures, '_CFuture'),
10911091
'requires the C _asyncio module')
10921092
class CSubFutureDoneCallbackTests(BaseFutureDoneCallbackTests,
@@ -1137,7 +1137,7 @@ class PyFutureInheritanceTests(BaseFutureInheritanceTests,
11371137
def _get_future_cls(self):
11381138
return futures._PyFuture
11391139

1140-
@unittest.skip('TODO: RUSTPYTHON: CPython specific test')
1140+
# TODO: RUSTPYTHON: CPython specific test
11411141
@unittest.skipUnless(hasattr(futures, '_CFuture'),
11421142
'requires the C _asyncio module')
11431143
class CFutureInheritanceTests(BaseFutureInheritanceTests,

Lib/test/test_asyncio/test_ssl.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ async def client(addr):
680680

681681
self.assertEqual(res, 'OK')
682682

683-
@unittest.skip('TODO: RUSTPYTHON; RuntimeError: Event loop stopped before Future completed.')
683+
@unittest.expectedFailure # TODO: RUSTPYTHON; RuntimeError: Event loop stopped before Future completed.
684684
def test_start_tls_client_reg_proto_1(self):
685685
HELLO_MSG = b'1' * self.PAYLOAD_SIZE
686686

@@ -742,7 +742,7 @@ async def client(addr):
742742
asyncio.wait_for(client(srv.addr),
743743
timeout=support.SHORT_TIMEOUT))
744744

745-
@unittest.skip('TODO: RUSTPYTHON; RuntimeError: Event loop stopped before Future completed.')
745+
@unittest.expectedFailure # TODO: RUSTPYTHON; RuntimeError: Event loop stopped before Future completed.
746746
def test_create_connection_memory_leak(self):
747747
HELLO_MSG = b'1' * self.PAYLOAD_SIZE
748748

@@ -807,7 +807,7 @@ async def client(addr):
807807
client_context = weakref.ref(client_context)
808808
self.assertIsNone(client_context())
809809

810-
@unittest.skip('TODO: RUSTPYTHON; RuntimeError: Event loop stopped before Future completed.')
810+
@unittest.expectedFailure # TODO: RUSTPYTHON; RuntimeError: Event loop stopped before Future completed.
811811
def test_start_tls_client_buf_proto_1(self):
812812
HELLO_MSG = b'1' * self.PAYLOAD_SIZE
813813

@@ -964,7 +964,7 @@ async def client(addr):
964964
asyncio.wait_for(client(srv.addr),
965965
timeout=support.SHORT_TIMEOUT))
966966

967-
@unittest.skip('TODO: RUSTPYTHON; RuntimeError: Event loop stopped before Future completed.')
967+
@unittest.expectedFailure # TODO: RUSTPYTHON; RuntimeError: Event loop stopped before Future completed.
968968
def test_start_tls_server_1(self):
969969
HELLO_MSG = b'1' * self.PAYLOAD_SIZE
970970

@@ -1189,7 +1189,7 @@ async def start_server():
11891189
for client in clients:
11901190
client.stop()
11911191

1192-
@unittest.skip('TODO: RUSTPYTHON; RuntimeError: Event loop stopped before Future completed.')
1192+
@unittest.expectedFailure # TODO: RUSTPYTHON; RuntimeError: Event loop stopped before Future completed.
11931193
def test_shutdown_cleanly(self):
11941194
CNT = 0
11951195
TOTAL_CNT = 25
@@ -1315,7 +1315,7 @@ async def client(addr):
13151315
with self.tcp_server(run(server)) as srv:
13161316
self.loop.run_until_complete(client(srv.addr))
13171317

1318-
@unittest.skip('TODO: RUSTPYTHON; ssl_error.SSLError: cannot read after shutdown')
1318+
@unittest.expectedFailure # TODO: RUSTPYTHON; ssl_error.SSLError: cannot read after shutdown
13191319
def test_remote_shutdown_receives_trailing_data(self):
13201320
CHUNK = 1024 * 128
13211321
SIZE = 32
@@ -1440,7 +1440,7 @@ def wrapper(sock):
14401440
with self.tcp_server(run(eof_server)) as srv:
14411441
self.loop.run_until_complete(client(srv.addr))
14421442

1443-
@unittest.skip('TODO: RUSTPYTHON; ssl_error.SSLError: cannot read after shutdown')
1443+
@unittest.expectedFailure # TODO: RUSTPYTHON; ssl_error.SSLError: cannot read after shutdown
14441444
def test_remote_shutdown_receives_trailing_data_on_slow_socket(self):
14451445
# This test is the same as test_remote_shutdown_receives_trailing_data,
14461446
# except it simulates a socket that is not able to write data in time,

Lib/test/test_asyncio/test_streams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,7 @@ async def handle_echo(reader, writer):
12461246
messages = self._basetest_unhandled_exceptions(handle_echo)
12471247
self.assertEqual(messages, [])
12481248

1249-
@unittest.skip('TODO: RUSTPYTHON; NotImplementedError')
1249+
@unittest.expectedFailure # TODO: RUSTPYTHON; NotImplementedError
12501250
def test_open_connection_happy_eyeball_refcycles(self):
12511251
port = socket_helper.find_unused_port()
12521252
async def main():

Lib/test/test_asyncio/test_taskgroups.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ async def outer():
918918

919919
await outer()
920920

921-
@unittest.skip('TODO: RUSTPYTHON; NotImplementedError')
921+
@unittest.expectedFailure # TODO: RUSTPYTHON; NotImplementedError
922922
async def test_exception_refcycles_direct(self):
923923
"""Test that TaskGroup doesn't keep a reference to the raised ExceptionGroup"""
924924
tg = asyncio.TaskGroup()
@@ -936,7 +936,7 @@ class _Done(Exception):
936936
self.assertIsNotNone(exc)
937937
self.assertListEqual(gc.get_referrers(exc), [])
938938

939-
@unittest.skip('TODO: RUSTPYTHON; NotImplementedError')
939+
@unittest.expectedFailure # TODO: RUSTPYTHON; NotImplementedError
940940
async def test_exception_refcycles_errors(self):
941941
"""Test that TaskGroup deletes self._errors, and __aexit__ args"""
942942
tg = asyncio.TaskGroup()
@@ -954,7 +954,7 @@ class _Done(Exception):
954954
self.assertIsInstance(exc, _Done)
955955
self.assertListEqual(gc.get_referrers(exc), [])
956956

957-
@unittest.skip('TODO: RUSTPYTHON; NotImplementedError')
957+
@unittest.expectedFailure # TODO: RUSTPYTHON; NotImplementedError
958958
async def test_exception_refcycles_parent_task(self):
959959
"""Test that TaskGroup deletes self._parent_task"""
960960
tg = asyncio.TaskGroup()
@@ -976,7 +976,7 @@ async def coro_fn():
976976
self.assertIsInstance(exc, _Done)
977977
self.assertListEqual(gc.get_referrers(exc), [])
978978

979-
@unittest.skip('TODO: RUSTPYTHON; NotImplementedError for gc.disable()')
979+
@unittest.expectedFailure # TODO: RUSTPYTHON; NotImplementedError for gc.disable()
980980
async def test_exception_refcycles_parent_task_wr(self):
981981
"""Test that TaskGroup deletes self._parent_task and create_task() deletes task"""
982982
tg = asyncio.TaskGroup()
@@ -1000,7 +1000,7 @@ async def coro_fn():
10001000
self.assertIsInstance(exc, _Done)
10011001
self.assertListEqual(gc.get_referrers(exc), [])
10021002

1003-
@unittest.skip('TODO: RUSTPYTHON; NotImplementedError for asyncio.CancelledError')
1003+
@unittest.expectedFailure # TODO: RUSTPYTHON; NotImplementedError for asyncio.CancelledError
10041004
async def test_exception_refcycles_propagate_cancellation_error(self):
10051005
"""Test that TaskGroup deletes propagate_cancellation_error"""
10061006
tg = asyncio.TaskGroup()
@@ -1016,7 +1016,7 @@ async def test_exception_refcycles_propagate_cancellation_error(self):
10161016
self.assertIsInstance(exc, asyncio.CancelledError)
10171017
self.assertListEqual(gc.get_referrers(exc), [])
10181018

1019-
@unittest.skip('TODO: RUSTPYTHON; NotImplementedError for coro.send(None)')
1019+
@unittest.expectedFailure # TODO: RUSTPYTHON; NotImplementedError for coro.send(None)
10201020
async def test_exception_refcycles_base_error(self):
10211021
"""Test that TaskGroup deletes self._base_error"""
10221022
class MyKeyboardInterrupt(KeyboardInterrupt):

0 commit comments

Comments
 (0)