summaryrefslogtreecommitdiff
path: root/test_six.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-08-21 21:57:17 -0400
committerJason R. Coombs <jaraco@jaraco.com>2013-08-21 21:57:17 -0400
commit0d25e11477f96ff1d469a351f99240e4c715d378 (patch)
treeae0bb2403647980fe0b53e8f8ec9d9b93791d980 /test_six.py
parent07fee917e9ec2b8b076fdfec9d5afe8bd576d479 (diff)
downloadsix-0d25e11477f96ff1d469a351f99240e4c715d378.tar.gz
A better name was definitely needed. 'add_metaclass' instead of 'patch_with_metaclass'. It's more direct and succinct.
Diffstat (limited to 'test_six.py')
-rw-r--r--test_six.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/test_six.py b/test_six.py
index 8305377..da7242d 100644
--- a/test_six.py
+++ b/test_six.py
@@ -498,41 +498,41 @@ def test_with_metaclass():
assert issubclass(X, Base2)
-def test_patch_with_metaclass():
+def test_add_metaclass():
class Meta(type):
pass
class X:
pass
- X = six.patch_with_metaclass(Meta)(X)
+ X = six.add_metaclass(Meta)(X)
assert type(X) is Meta
assert issubclass(X, object)
class Base(object):
pass
class X(Base):
pass
- X = six.patch_with_metaclass(Meta)(X)
+ X = six.add_metaclass(Meta)(X)
assert type(X) is Meta
assert issubclass(X, Base)
class Base2(object):
pass
class X(Base, Base2):
pass
- X = six.patch_with_metaclass(Meta)(X)
+ X = six.add_metaclass(Meta)(X)
assert type(X) is Meta
assert issubclass(X, Base)
assert issubclass(X, Base2)
-def test_patch_with_metaclass_extra_meta():
+def test_add_metaclass_extra_meta():
class Meta1(type):
m1 = "m1"
class Meta2(Meta1):
m2 = "m2"
class Base:
b = "b"
- Base = six.patch_with_metaclass(Meta1)(Base)
+ Base = six.add_metaclass(Meta1)(Base)
class X(Base):
x = "x"
- X = six.patch_with_metaclass(Meta2)(X)
+ X = six.add_metaclass(Meta2)(X)
assert type(X) is Meta2
assert issubclass(X, Base)
assert type(Base) is Meta1