Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4)

Unified Diff: Lib/test/test_copy.py

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/test/test_concurrent_futures.py ('k') | Lib/test/test_cprofile.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_copy.py Tue Jul 26 09:37:46 2011 +0300
+++ b/Lib/test/test_copy.py Mon Jul 25 09:47:18 2011 -0400
@@ -321,24 +321,9 @@
def test_deepcopy_keepalive(self):
memo = {}
- x = []
+ x = 42
y = copy.deepcopy(x, memo)
- self.assertIs(memo[id(memo)][0], x)
-
- def test_deepcopy_dont_memo_immutable(self):
- memo = {}
- x = [1, 2, 3, 4]
- y = copy.deepcopy(x, memo)
- self.assertEqual(y, x)
- # There's the entry for the new list, and the keep alive.
- self.assertEqual(len(memo), 2)
-
- memo = {}
- x = [(1, 2)]
- y = copy.deepcopy(x, memo)
- self.assertEqual(y, x)
- # Tuples with immutable contents are immutable for deepcopy.
- self.assertEqual(len(memo), 2)
+ self.assertTrue(memo[id(x)] is x)
def test_deepcopy_inst_vanilla(self):
class C:
« no previous file with comments | « Lib/test/test_concurrent_futures.py ('k') | Lib/test/test_cprofile.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+