summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Cardona <remi.cardona@logilab.fr>2015-06-25 19:27:33 +0200
committerRémi Cardona <remi.cardona@logilab.fr>2015-06-25 19:27:33 +0200
commitabdaa7acbcfc2f16691896102a6674d986d607ce (patch)
treef1659b8683089ea463db39f8474c3b7fab37a15f
parent17e92a8ad000c7504e796ca7f55cc437a3234681 (diff)
downloadlogilab-common-abdaa7acbcfc2f16691896102a6674d986d607ce.tar.gz
[testlib] Deal with set binary operator changes from python 3
type(x | y) where type(x) is a subclass of set is now set, not type(x). See http://bugs.python.org/issue1721812 Related to #105845.
-rw-r--r--logilab/common/testlib.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/logilab/common/testlib.py b/logilab/common/testlib.py
index bb84aaa..ab535a2 100644
--- a/logilab/common/testlib.py
+++ b/logilab/common/testlib.py
@@ -454,6 +454,9 @@ class Tags(set):
def match(self, exp):
return eval(exp, {}, self)
+ def __or__(self, other):
+ return Tags(*super(Tags, self).__or__(other))
+
# duplicate definition from unittest2 of the _deprecate decorator
def _deprecate(original_func):