FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.10] bpo-46425: fix direct invocation of `asyncio` tests (GH-30725) by miss-islington · Pull Request #30782 · python/cpython · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (6) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
4 changes: 4 additions & 0 deletions Lib/test/test_asyncio/test_context.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ async def main():

self.assertEqual(str(r2[0]), '0.333333')
self.assertEqual(str(r2[1]), '0.111111')


if __name__ == '__main__':
unittest.main()
4 changes: 4 additions & 0 deletions Lib/test/test_asyncio/test_futures2.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ async def func():
# 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()
4 changes: 4 additions & 0 deletions Lib/test/test_asyncio/test_protocols.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ def test_subprocess_protocol(self):
self.assertIsNone(sp.pipe_connection_lost(1, f))
self.assertIsNone(sp.process_exited())
self.assertFalse(hasattr(sp, '__dict__'))


if __name__ == '__main__':
unittest.main()
6 changes: 5 additions & 1 deletion Lib/test/test_asyncio/test_runners.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import unittest

from unittest import mock
from . import utils as test_utils
from test.test_asyncio import utils as test_utils


class TestPolicy(asyncio.AbstractEventLoopPolicy):
Expand Down Expand Up @@ -180,3 +180,7 @@ async def main():

self.assertIsNone(spinner.ag_frame)
self.assertFalse(spinner.ag_running)


if __name__ == '__main__':
unittest.main()
4 changes: 4 additions & 0 deletions Lib/test/test_asyncio/test_sendfile.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -565,3 +565,7 @@ class SelectEventLoopTests(SendfileTestsBase,

def create_event_loop(self):
return asyncio.SelectorEventLoop(selectors.SelectSelector())


if __name__ == '__main__':
unittest.main()
5 changes: 4 additions & 1 deletion Lib/test/test_asyncio/test_sock_lowlevel.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import socket
import time
import asyncio
import sys
import unittest
Expand Down Expand Up @@ -512,3 +511,7 @@ class SelectEventLoopTests(BaseSockTestsMixin,

def create_event_loop(self):
return asyncio.SelectorEventLoop(selectors.SelectSelector())


if __name__ == '__main__':
unittest.main()

Back | FazBrowse Home | New Git URL