summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_futures.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-07-07 10:46:09 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-07-07 10:46:09 (GMT)
commit3bc13cc8b0b85f989b8da9c5718fc5319ad06248 (patch)
tree52fc5995a7cc1ccafce61ef403b7dea1a4ff342d /Lib/test/test_asyncio/test_futures.py
parent667abc7d42e87b87338981276d0eac9895d4abf4 (diff)
parente50dafcd636ba32db890600164698bb070d40d97 (diff)
downloadcpython-3bc13cc8b0b85f989b8da9c5718fc5319ad06248.zip
cpython-3bc13cc8b0b85f989b8da9c5718fc5319ad06248.tar.gz
cpython-3bc13cc8b0b85f989b8da9c5718fc5319ad06248.tar.bz2
Merge heads
Diffstat (limited to 'Lib/test/test_asyncio/test_futures.py')
-rw-r--r--Lib/test/test_asyncio/test_futures.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_futures.py b/Lib/test/test_asyncio/test_futures.py
index 96b41d6..a6071ea 100644
--- a/Lib/test/test_asyncio/test_futures.py
+++ b/Lib/test/test_asyncio/test_futures.py
@@ -343,6 +343,12 @@ class FutureTests(test_utils.TestCase):
message = m_log.error.call_args[0][0]
self.assertRegex(message, re.compile(regex, re.DOTALL))
+ def test_set_result_unless_cancelled(self):
+ fut = asyncio.Future(loop=self.loop)
+ fut.cancel()
+ fut._set_result_unless_cancelled(2)
+ self.assertTrue(fut.cancelled())
+
class FutureDoneCallbackTests(test_utils.TestCase):