Show More
@@ -4,7 +4,6 b' Test for async helpers.' | |||
|
4 | 4 | Should only trigger on python 3.5+ or will have syntax errors. |
|
5 | 5 | """ |
|
6 | 6 | from itertools import chain, repeat |
|
7 | import nose.tools as nt | |
|
8 | 7 | from textwrap import dedent, indent |
|
9 | 8 | from unittest import TestCase |
|
10 | 9 | from IPython.testing.decorators import skip_without |
@@ -24,10 +23,10 b' from IPython.core.async_helpers import _should_be_async' | |||
|
24 | 23 | |
|
25 | 24 | class AsyncTest(TestCase): |
|
26 | 25 | def test_should_be_async(self): |
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
|
26 | self.assertFalse(_should_be_async("False")) | |
|
27 | self.assertTrue(_should_be_async("await bar()")) | |
|
28 | self.assertTrue(_should_be_async("x = await bar()")) | |
|
29 | self.assertFalse( | |
|
31 | 30 | _should_be_async( |
|
32 | 31 | dedent( |
|
33 | 32 | """ |
@@ -298,7 +297,7 b' class AsyncTest(TestCase):' | |||
|
298 | 297 | import asyncio |
|
299 | 298 | await asyncio.sleep(0) |
|
300 | 299 | """) |
|
301 |
with |
|
|
300 | with self.assertRaises(TypeError): | |
|
302 | 301 | res.raise_error() |
|
303 | 302 | |
|
304 | 303 | @skip_without('trio') |
@@ -308,7 +307,7 b' class AsyncTest(TestCase):' | |||
|
308 | 307 | import trio |
|
309 | 308 | await trio.sleep(0) |
|
310 | 309 | """) |
|
311 |
with |
|
|
310 | with self.assertRaises(RuntimeError): | |
|
312 | 311 | res.raise_error() |
|
313 | 312 | |
|
314 | 313 |
General Comments 0
You need to be logged in to leave comments.
Login now