You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kg...@apache.org on 2015/06/22 14:57:12 UTC
[09/34] qpid-proton git commit: PROTON-490: enable six.py support for
operator method calls
PROTON-490: enable six.py support for operator method calls
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/93ccc736
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/93ccc736
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/93ccc736
Branch: refs/heads/master
Commit: 93ccc7364bfe28d3076a441409be8cbc5c88128b
Parents: adfe2a2
Author: Ken Giusti <kg...@apache.org>
Authored: Wed Apr 22 15:09:45 2015 -0400
Committer: Ken Giusti <kg...@apache.org>
Committed: Wed Apr 22 15:09:45 2015 -0400
----------------------------------------------------------------------
tests/python/six.py | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/93ccc736/tests/python/six.py
----------------------------------------------------------------------
diff --git a/tests/python/six.py b/tests/python/six.py
index ffa3fe1..4b572bb 100644
--- a/tests/python/six.py
+++ b/tests/python/six.py
@@ -32,6 +32,17 @@ __author__ = "Benjamin Peterson <be...@python.org>"
__version__ = "1.9.0"
+# begin QPID
+# added to support running the unit tests under JYTHON
+if not hasattr(operator, 'methodcaller'):
+ def _methodcaller(cls, name, *args, **kwargs):
+ def caller(obj):
+ return getattr(obj, name)(*args, **kwargs)
+ return caller
+ operator.methodcaller = classmethod(_methodcaller)
+# QPID end
+
+
# Useful for very coarse version differentiation.
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org