summaryrefslogtreecommitdiff
path: root/test_six.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-07-11 22:02:23 -0400
committerJason R. Coombs <jaraco@jaraco.com>2013-07-11 22:02:23 -0400
commit9654ac823970b576691db9461b0ceb3c3dfd95ab (patch)
tree34f3a043c7147263884369263b3a066de034dcf2 /test_six.py
parentbca9badaad0f2208c3878254704697a8d1e9a8d2 (diff)
downloadsix-9654ac823970b576691db9461b0ceb3c3dfd95ab.tar.gz
Expanded tests on patch_with_metaclass
Diffstat (limited to 'test_six.py')
-rw-r--r--test_six.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/test_six.py b/test_six.py
index bb306e8..e45e4f7 100644
--- a/test_six.py
+++ b/test_six.py
@@ -521,3 +521,19 @@ def test_patch_with_metaclass():
assert type(X) is Meta
assert issubclass(X, Base)
assert issubclass(X, Base2)
+
+def test_patch_with_metaclass_extra_meta():
+ class Meta1(type):
+ pass
+ class Meta2(Meta1):
+ pass
+ @six.patch_with_metaclass(Meta1)
+ class Base:
+ pass
+ @six.patch_with_metaclass(Meta2)
+ class X(Base):
+ pass
+ assert type(X) is Meta2
+ assert issubclass(X, Base)
+ assert type(Base) is Meta1
+ assert not '__dict__' in vars(X)