PATH: //proc/thread-self/root/opt/alt/python311/lib64/python3.11/test/test_asyncio
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 __init__.py
↓
X
📄 __main__.py
↓
X
📁 __pycache__/
X
📄 echo.py
↓
X
📄 echo2.py
↓
X
📄 echo3.py
↓
X
📄 functional.py
↓
X
📄 test_base_events.py
↓
X
📄 test_buffered_proto.py
↓
X
📄 test_context.py
↓
X
📄 test_events.py
↓
X
📄 test_futures.py
↓
X
📄 test_futures2.py
↓
X
📄 test_locks.py
↓
X
📄 test_pep492.py
↓
X
📄 test_proactor_events.py
↓
X
📄 test_protocols.py
↓
X
📄 test_queues.py
↓
X
📄 test_runners.py
↓
X
📄 test_selector_events.py
↓
X
📄 test_sendfile.py
↓
X
📄 test_server.py
↓
X
📄 test_sock_lowlevel.py
↓
X
📄 test_ssl.py
↓
X
📄 test_sslproto.py
↓
X
📄 test_streams.py
↓
X
📄 test_subprocess.py
↓
X
📄 test_taskgroups.py
↓
X
📄 test_tasks.py
↓
X
📄 test_threads.py
↓
X
📄 test_timeouts.py
↓
X
📄 test_transports.py
↓
X
📄 test_unix_events.py
↓
X
📄 test_waitfor.py
↓
X
📄 test_windows_events.py
↓
X
📄 test_windows_utils.py
↓
X
📄 utils.py
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: test_futures2.py
# IsolatedAsyncioTestCase based tests import asyncio import traceback import unittest from asyncio import tasks def tearDownModule(): asyncio.set_event_loop_policy(None) class FutureTests: async def test_future_traceback(self): async def raise_exc(): raise TypeError(42) future = self.cls(raise_exc()) for _ in range(5): try: await future except TypeError as e: tb = ''.join(traceback.format_tb(e.__traceback__)) self.assertEqual(tb.count("await future"), 1) else: self.fail('TypeError was not raised') @unittest.skipUnless(hasattr(tasks, '_CTask'), 'requires the C _asyncio module') class CFutureTests(FutureTests, unittest.IsolatedAsyncioTestCase): cls = tasks._CTask class PyFutureTests(FutureTests, unittest.IsolatedAsyncioTestCase): cls = tasks._PyTask class FutureReprTests(unittest.IsolatedAsyncioTestCase): async def test_recursive_repr_for_pending_tasks(self): # The call crashes if the guard for recursive call # in base_futures:_future_repr_info is absent # See Also: https://bugs.python.org/issue42183 async def func(): return asyncio.all_tasks() # The repr() call should not raise RecursiveError at first. # The check for returned string is not very reliable but # exact comparison for the whole string is even weaker. self.assertIn('...', repr(await asyncio.wait_for(func(), timeout=10))) if __name__ == '__main__': unittest.main()
SIMPAN PERUBAHAN