asyncio: Add an unit test to check that setting the PYTHONASYNCIODEBUG env var

enables debug mode of the event loop.
This commit is contained in:
Victor Stinner 2014-06-23 00:19:33 +02:00
parent 7b7120e159
commit c082ee692b
2 changed files with 24 additions and 4 deletions

View file

@ -1577,11 +1577,7 @@ class GatherTestsBase:
self.assertEqual(fut.result(), [3, 1, exc, exc2])
def test_env_var_debug(self):
path = os.path.dirname(asyncio.__file__)
path = os.path.normpath(os.path.join(path, '..'))
code = '\n'.join((
'import sys',
'sys.path.insert(0, %r)' % path,
'import asyncio.tasks',
'print(asyncio.tasks._DEBUG)'))