diff options
author | Guido van Rossum <guido@python.org> | 1997-06-02 23:14:37 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-06-02 23:14:37 (GMT) |
commit | 2d3aac2377965e8dc8a99d32ccc87d7f798e8feb (patch) | |
tree | 2558f218368afd0343fdb1d6a668c1ad9738527a | |
parent | ce1fa263e61aefdc6649295abac6c40977604325 (diff) | |
download | cpython-2d3aac2377965e8dc8a99d32ccc87d7f798e8feb.zip cpython-2d3aac2377965e8dc8a99d32ccc87d7f798e8feb.tar.gz cpython-2d3aac2377965e8dc8a99d32ccc87d7f798e8feb.tar.bz2 |
The usual
-rwxr-xr-x | Lib/dos-8x3/test_typ.py | 9 | ||||
-rwxr-xr-x | Lib/dos_8x3/test_typ.py | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Lib/dos-8x3/test_typ.py b/Lib/dos-8x3/test_typ.py index 51c76dc..8be70b8 100755 --- a/Lib/dos-8x3/test_typ.py +++ b/Lib/dos-8x3/test_typ.py @@ -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' diff --git a/Lib/dos_8x3/test_typ.py b/Lib/dos_8x3/test_typ.py index 51c76dc..8be70b8 100755 --- a/Lib/dos_8x3/test_typ.py +++ b/Lib/dos_8x3/test_typ.py @@ -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' |