diff options
author | Yury Selivanov <yury@magic.io> | 2016-09-15 20:01:56 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-09-15 20:01:56 (GMT) |
commit | 2ceb5aacaabb226888029df05311b20edcc6e903 (patch) | |
tree | cab46b9a83a9dd2f5d9f15931c22b4ed32f94c07 /Lib/test | |
parent | 01683d86f241a591bfd18cb130a98323fc2d4055 (diff) | |
parent | 62b81c33d146d4f5b36589a93736b57d604cf260 (diff) | |
download | cpython-2ceb5aacaabb226888029df05311b20edcc6e903.zip cpython-2ceb5aacaabb226888029df05311b20edcc6e903.tar.gz cpython-2ceb5aacaabb226888029df05311b20edcc6e903.tar.bz2 |
Merge 3.6 (issue #26654)
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_asyncio/test_events.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 7c901f2..b3f35ce 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -2224,7 +2224,7 @@ else: return asyncio.SelectorEventLoop(selectors.SelectSelector()) -def noop(*args): +def noop(*args, **kwargs): pass @@ -2305,6 +2305,13 @@ class HandleTests(test_utils.TestCase): % (re.escape(filename), lineno)) self.assertRegex(repr(h), regex) + # partial function with keyword args + cb = functools.partial(noop, x=1) + h = asyncio.Handle(cb, (2, 3), self.loop) + regex = (r'^<Handle noop\(x=1\)\(2, 3\) at %s:%s>$' + % (re.escape(filename), lineno)) + self.assertRegex(repr(h), regex) + # partial method if sys.version_info >= (3, 4): method = HandleTests.test_handle_repr |