diff options
author | Raymond Hettinger <python@rcn.com> | 2011-05-05 21:34:35 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-05-05 21:34:35 (GMT) |
commit | 1c7b7f7fbeb79eaddcd21b20a43802db0f7790a1 (patch) | |
tree | 57bdef35d8520e3ca1d9e8f3b7286b05e488d117 /Lib/test | |
parent | 7b48432a77c9a3e902e28fa654882f04c38423fd (diff) | |
download | cpython-1c7b7f7fbeb79eaddcd21b20a43802db0f7790a1.zip cpython-1c7b7f7fbeb79eaddcd21b20a43802db0f7790a1.tar.gz cpython-1c7b7f7fbeb79eaddcd21b20a43802db0f7790a1.tar.bz2 |
Userlist.copy() wasn't returning a UserList.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_userlist.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_userlist.py b/Lib/test/test_userlist.py index 868ed24..6381070 100644 --- a/Lib/test/test_userlist.py +++ b/Lib/test/test_userlist.py @@ -52,6 +52,12 @@ class UserListTest(list_tests.CommonTest): return str(key) + '!!!' self.assertEqual(next(iter(T((1,2)))), "0!!!") + def test_userlist_copy(self): + u = self.type2test([6, 8, 1, 9, 1]) + v = u.copy() + self.assertEqual(u, v) + self.assertEqual(type(u), type(v)) + def test_main(): support.run_unittest(UserListTest) |