summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_copy.py
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2013-12-01 21:25:26 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2013-12-01 21:25:26 (GMT)
commit5c1c3b4f197c57952760be37d77d73669284a607 (patch)
treea9ab8c86fa593dabb5a39b6b5fe797ef5ed47b02 /Lib/test/test_copy.py
parent361e30c17a7973874334597903afb3ba5a477f49 (diff)
downloadcpython-5c1c3b4f197c57952760be37d77d73669284a607.zip
cpython-5c1c3b4f197c57952760be37d77d73669284a607.tar.gz
cpython-5c1c3b4f197c57952760be37d77d73669284a607.tar.bz2
Issue #11480: Fixed copy.copy to work with classes with custom metaclasses.
Patch by Daniel Urban.
Diffstat (limited to 'Lib/test/test_copy.py')
-rw-r--r--Lib/test/test_copy.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_copy.py b/Lib/test/test_copy.py
index c4baae4..cde0bae 100644
--- a/Lib/test/test_copy.py
+++ b/Lib/test/test_copy.py
@@ -3,6 +3,7 @@
import copy
import copyreg
import weakref
+import abc
from operator import le, lt, ge, gt, eq, ne
import unittest
@@ -93,9 +94,11 @@ class TestCopy(unittest.TestCase):
pass
def f():
pass
+ class WithMetaclass(metaclass=abc.ABCMeta):
+ pass
tests = [None, 42, 2**100, 3.14, True, False, 1j,
"hello", "hello\u1234", f.__code__,
- NewStyle, range(10), Classic, max]
+ NewStyle, range(10), Classic, max, WithMetaclass]
for x in tests:
self.assertIs(copy.copy(x), x)