summaryrefslogtreecommitdiff
path: root/test/test_deprecation.py
diff options
context:
space:
mode:
authorLaurent Peuch <cortex@worlddomination.be>2020-05-07 22:22:42 +0200
committerLaurent Peuch <cortex@worlddomination.be>2020-05-07 22:22:42 +0200
commit30d47f2bd6c3fb00108a7f2faebade1a30836fef (patch)
tree700d58e2ee31e3cca28ba69789f9625230d7ba8b /test/test_deprecation.py
parent15578b2aa05c3121c64326db33081dc1ac368905 (diff)
downloadlogilab-common-30d47f2bd6c3fb00108a7f2faebade1a30836fef.tar.gz
[fix] metaclass conflict for class_deprecated
Actually the old compatibility code actually prevented this bug so back it up.
Diffstat (limited to 'test/test_deprecation.py')
-rw-r--r--test/test_deprecation.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_deprecation.py b/test/test_deprecation.py
index 78b2256..65ef8fd 100644
--- a/test/test_deprecation.py
+++ b/test/test_deprecation.py
@@ -63,6 +63,17 @@ class RawInputTC(TestCase):
self.messages, ["[test_deprecation] OldClass is deprecated, use AnyClass instead"]
)
+ def test_class_renamed_conflict_metaclass(self):
+ class SomeMetaClass(type):
+ pass
+
+ class AnyClass(metaclass=SomeMetaClass):
+ pass
+
+ # make sure the "metaclass conflict: the metaclass of a derived class # must be a
+ # (non-strict) subclass of the metaclasses of all its bases" exception won't be raised
+ deprecation.class_renamed("OldClass", AnyClass)
+
def test_class_moved(self):
class AnyClass(object):
pass