Author: Raffael Tfirst <[email protected]>
Branch: py3.5-async
Changeset: r86077:3e98b6f5791a
Date: 2016-08-08 18:00 +0200
http://bitbucket.org/pypy/pypy/changeset/3e98b6f5791a/
Log: Add test for asyncio checking a GIL initialization error on running
"await asyncio.open_connection"
diff --git a/pypy/module/_asyncio/test/test_asyncio.py
b/pypy/module/_asyncio/test/test_asyncio.py
new file mode 100644
--- /dev/null
+++ b/pypy/module/_asyncio/test/test_asyncio.py
@@ -0,0 +1,17 @@
+class AppTestAsyncIO(object):
+
+ spaceconfig =
dict(usemodules=["select","_socket","thread","signal","struct","_multiprocessing","array","_posixsubprocess","fcntl","unicodedata"])
+
+ def setup_class(cls):
+ cls.space.appexec([], """():
+ import encodings.idna
+ import asyncio
+ async def f():
+ reader, writer = await asyncio.open_connection('example.com', 80)
+
+ loop = asyncio.get_event_loop()
+ loop.run_until_complete(f())""")
+
+ def test_gil_issue(self):
+ #needed to execute setup_call in the first place
+ assert 1==1
\ No newline at end of file
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit