diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-08-17 23:26:58 -0500 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-08-17 23:26:58 -0500 |
commit | 98db7f7696b9fbe9eb6ccd1c8fc8b4d880709c07 (patch) | |
tree | 029eae0d037e3e0059b21b902d37fd97579a1915 /test_six.py | |
parent | 72cc15e87ca8d54f0a5d37204994cc4fa9eac2ad (diff) | |
download | six-git-98db7f7696b9fbe9eb6ccd1c8fc8b4d880709c07.tar.gz |
fix add_metaclass when there is a __weakref__ or __dict__ slot (closes #88)
Diffstat (limited to 'test_six.py')
-rw-r--r-- | test_six.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test_six.py b/test_six.py index 1536276..0125d6b 100644 --- a/test_six.py +++ b/test_six.py @@ -730,3 +730,7 @@ def test_add_metaclass(): py.test.raises(AttributeError, setattr, instance, "a", "baz") py.test.raises(AttributeError, setattr, instance, "b", "baz") + class MySlotsWeakref(object): + __slots__ = "__weakref__", + MySlotsWeakref = six.add_metaclass(Meta)(MySlotsWeakref) + assert type(MySlotsWeakref) is Meta |