aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/dos-8x3/test_typ.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-11-26 15:44:34 +0000
committerGuido van Rossum <guido@python.org>1997-11-26 15:44:34 +0000
commit0b23348aa944dcb97c84b34d399c857f039e5773 (patch)
tree88178b09c8a16b93ab1ab174df968a61d36e7293 /Lib/dos-8x3/test_typ.py
parent330c660f66243094e082500bc1d760b2b86024cb (diff)
downloadcpython-0b23348aa944dcb97c84b34d399c857f039e5773.tar.gz
cpython-0b23348aa944dcb97c84b34d399c857f039e5773.zip
The usual
Diffstat (limited to 'Lib/dos-8x3/test_typ.py')
-rwxr-xr-xLib/dos-8x3/test_typ.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/dos-8x3/test_typ.py b/Lib/dos-8x3/test_typ.py
index eedf65aead4..7cca131c7e2 100755
--- a/Lib/dos-8x3/test_typ.py
+++ b/Lib/dos-8x3/test_typ.py
@@ -189,3 +189,12 @@ d.update({1:1, 2:2, 3:3})
if d != {1:1, 2:2, 3:3}: raise TestFailed, 'dict update'
if d.copy() != {1:1, 2:2, 3:3}: raise TestFailed, 'dict copy'
if {}.copy() != {}: raise TestFailed, 'empty dict copy'
+# dict.get()
+d = {}
+if d.get('c') != None: raise TestFailed, 'missing {} get, no 2nd arg'
+if d.get('c', 3) != 3: raise TestFailed, 'missing {} get, w/ 2nd arg'
+d = {'a' : 1, 'b' : 2}
+if d.get('c') != None: raise TestFailed, 'missing dict get, no 2nd arg'
+if d.get('c', 3) != 3: raise TestFailed, 'missing dict get, w/ 2nd arg'
+if d.get('a') != 1: raise TestFailed, 'present dict get, no 2nd arg'
+if d.get('a', 3) != 1: raise TestFailed, 'present dict get, w/ 2nd arg'