diff options
author | Rémi Cardona <remi.cardona@logilab.fr> | 2015-06-25 19:27:33 +0200 |
---|---|---|
committer | Rémi Cardona <remi.cardona@logilab.fr> | 2015-06-25 19:27:33 +0200 |
commit | abdaa7acbcfc2f16691896102a6674d986d607ce (patch) | |
tree | f1659b8683089ea463db39f8474c3b7fab37a15f | |
parent | 17e92a8ad000c7504e796ca7f55cc437a3234681 (diff) | |
download | logilab-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.py | 3 |
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): |