Added python-eventlet 0.15.2 for Ubuntu 14.04
[packages/trusty/python-eventlet.git] / eventlet / tests / mysqldb_test_monkey_patch.py
diff --git a/eventlet/tests/mysqldb_test_monkey_patch.py b/eventlet/tests/mysqldb_test_monkey_patch.py
new file mode 100644 (file)
index 0000000..2d9c0e7
--- /dev/null
@@ -0,0 +1,12 @@
+from __future__ import print_function
+import MySQLdb as m
+from eventlet import patcher
+from eventlet.green import MySQLdb as gm
+
+# no standard tests in this file, ignore
+__test__ = False
+
+if __name__ == '__main__':
+    patcher.monkey_patch(all=True, MySQLdb=True)
+    print("mysqltest {0}".format(",".join(sorted(patcher.already_patched.keys()))))
+    print("connect {0}".format(m.connect == gm.connect))