]> granicus.if.org Git - python/commitdiff
The usual
authorGuido van Rossum <guido@python.org>
Mon, 2 Jun 1997 23:14:37 +0000 (23:14 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 2 Jun 1997 23:14:37 +0000 (23:14 +0000)
Lib/dos-8x3/test_typ.py
Lib/dos_8x3/test_typ.py

index 51c76dc6d988d1a8bde74dd07dab17a7bc3e1643..8be70b8f1d893897ed55e7283d6ee68e8a61032d 100755 (executable)
@@ -180,3 +180,12 @@ d['a'] = 4
 if d['c'] <> 3 or d['a'] <> 4: raise TestFailed, 'dict item assignment'
 del d['b']
 if d <> {'a': 4, 'c': 3}: raise TestFailed, 'dict item deletion'
+d = {1:1, 2:2, 3:3}
+d.clear()
+if d != {}: raise TestFailed, 'dict clear'
+d.absorb({1:100})
+d.absorb({2:20})
+d.absorb({1:1, 2:2, 3:3})
+if d != {1:1, 2:2, 3:3}: raise TestFailed, 'dict absorb'
+if d.copy() != {1:1, 2:2, 3:3}: raise TestFailed, 'dict copy'
+if {}.copy() != {}: raise TestFailed, 'empty dict copy'
index 51c76dc6d988d1a8bde74dd07dab17a7bc3e1643..8be70b8f1d893897ed55e7283d6ee68e8a61032d 100755 (executable)
@@ -180,3 +180,12 @@ d['a'] = 4
 if d['c'] <> 3 or d['a'] <> 4: raise TestFailed, 'dict item assignment'
 del d['b']
 if d <> {'a': 4, 'c': 3}: raise TestFailed, 'dict item deletion'
+d = {1:1, 2:2, 3:3}
+d.clear()
+if d != {}: raise TestFailed, 'dict clear'
+d.absorb({1:100})
+d.absorb({2:20})
+d.absorb({1:1, 2:2, 3:3})
+if d != {1:1, 2:2, 3:3}: raise TestFailed, 'dict absorb'
+if d.copy() != {1:1, 2:2, 3:3}: raise TestFailed, 'dict copy'
+if {}.copy() != {}: raise TestFailed, 'empty dict copy'