summaryrefslogtreecommitdiff
path: root/tests/mysqldb_test_monkey_patch.py
diff options
context:
space:
mode:
authorSergey Shepelev <temotor@gmail.com>2014-04-23 13:27:49 +0400
committerSergey Shepelev <temotor@gmail.com>2014-04-23 15:15:22 +0400
commit1b9f0f0edb285be01bc570b1f64ee2aa2cba49db (patch)
tree90dff04380efcae8250730f9832c4ab2c786f338 /tests/mysqldb_test_monkey_patch.py
parent92d12567b20dbe159a1a8a8db4d2cd05d15e6588 (diff)
downloadeventlet-1b9f0f0edb285be01bc570b1f64ee2aa2cba49db.tar.gz
python3 compatibility: print function
Diffstat (limited to 'tests/mysqldb_test_monkey_patch.py')
-rw-r--r--tests/mysqldb_test_monkey_patch.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/mysqldb_test_monkey_patch.py b/tests/mysqldb_test_monkey_patch.py
new file mode 100644
index 0000000..2d9c0e7
--- /dev/null
+++ b/tests/mysqldb_test_monkey_patch.py
@@ -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))