(self)
| 91 | # Type-specific _copy_xxx() methods |
| 92 | |
| 93 | def test_copy_atomic(self): |
| 94 | class NewStyle: |
| 95 | pass |
| 96 | def f(): |
| 97 | pass |
| 98 | class WithMetaclass(metaclass=abc.ABCMeta): |
| 99 | pass |
| 100 | tests = [None, ..., NotImplemented, |
| 101 | 42, 2**100, 3.14, True, False, 1j, |
| 102 | "hello", "hello\u1234", f.__code__, |
| 103 | b"world", bytes(range(256)), range(10), slice(1, 10, 2), |
| 104 | NewStyle, max, WithMetaclass, property()] |
| 105 | for x in tests: |
| 106 | self.assertIs(copy.copy(x), x) |
| 107 | |
| 108 | def test_copy_list(self): |
| 109 | x = [1, 2, 3] |