File: test__issue302monkey.py

package info (click to toggle)
python-gevent 1.0.1-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 9,948 kB
  • ctags: 12,954
  • sloc: python: 39,061; ansic: 26,289; sh: 13,582; makefile: 833; awk: 18
file content (14 lines) | stat: -rw-r--r-- 360 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import sys


if 'gevent' not in sys.modules:
    from subprocess import Popen
    args = [sys.executable, '-m', 'gevent.monkey', __file__]
    p = Popen(args)
    code = p.wait()
    assert code == 0, code

else:
    import socket
    assert 'gevent' in repr(socket.socket), repr(socket.socket)
    assert __file__ == 'test__issue302monkey.py', repr(__file__)