File: mysqldb_monkey_patch.py

package info (click to toggle)
python-eventlet 0.40.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,200 kB
  • sloc: python: 25,101; sh: 78; makefile: 31
file content (19 lines) | stat: -rw-r--r-- 480 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
__test__ = False

if __name__ == '__main__':
    import MySQLdb as m
    from eventlet import patcher
    from eventlet.green import MySQLdb as gm
    patcher.monkey_patch(all=True, MySQLdb=True)
    patched_set = set(patcher.already_patched) - {'psycopg'}
    assert patched_set == frozenset([
        'MySQLdb',
        'os',
        'select',
        'socket',
        'subprocess',
        'thread',
        'time',
    ])
    assert m.connect == gm.connect
    print('pass')