diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-07-11 22:02:23 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-07-11 22:02:23 -0400 |
commit | 9654ac823970b576691db9461b0ceb3c3dfd95ab (patch) | |
tree | 34f3a043c7147263884369263b3a066de034dcf2 /test_six.py | |
parent | bca9badaad0f2208c3878254704697a8d1e9a8d2 (diff) | |
download | six-9654ac823970b576691db9461b0ceb3c3dfd95ab.tar.gz |
Expanded tests on patch_with_metaclass
Diffstat (limited to 'test_six.py')
-rw-r--r-- | test_six.py | 16 |
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) |