Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2d3aac2

Browse files
committed
The usual
1 parent ce1fa26 commit 2d3aac2

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

Lib/dos-8x3/test_typ.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,12 @@ def revcmp(a, b): return cmp(b, a)
180180
if d['c'] <> 3 or d['a'] <> 4: raise TestFailed, 'dict item assignment'
181181
del d['b']
182182
if d <> {'a': 4, 'c': 3}: raise TestFailed, 'dict item deletion'
183+
d = {1:1, 2:2, 3:3}
184+
d.clear()
185+
if d != {}: raise TestFailed, 'dict clear'
186+
d.absorb({1:100})
187+
d.absorb({2:20})
188+
d.absorb({1:1, 2:2, 3:3})
189+
if d != {1:1, 2:2, 3:3}: raise TestFailed, 'dict absorb'
190+
if d.copy() != {1:1, 2:2, 3:3}: raise TestFailed, 'dict copy'
191+
if {}.copy() != {}: raise TestFailed, 'empty dict copy'

Lib/dos_8x3/test_typ.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,12 @@ def revcmp(a, b): return cmp(b, a)
180180
if d['c'] <> 3 or d['a'] <> 4: raise TestFailed, 'dict item assignment'
181181
del d['b']
182182
if d <> {'a': 4, 'c': 3}: raise TestFailed, 'dict item deletion'
183+
d = {1:1, 2:2, 3:3}
184+
d.clear()
185+
if d != {}: raise TestFailed, 'dict clear'
186+
d.absorb({1:100})
187+
d.absorb({2:20})
188+
d.absorb({1:1, 2:2, 3:3})
189+
if d != {1:1, 2:2, 3:3}: raise TestFailed, 'dict absorb'
190+
if d.copy() != {1:1, 2:2, 3:3}: raise TestFailed, 'dict copy'
191+
if {}.copy() != {}: raise TestFailed, 'empty dict copy'

0 commit comments

Comments
 (0)