diff options
author | Guido van Rossum <guido@python.org> | 1997-04-02 06:13:34 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-04-02 06:13:34 (GMT) |
commit | 228b8e88bc7a7ce740e5c7326697e7c2256e099f (patch) | |
tree | 81149f4696131ea3d2c123fb169c8a31db23a76a /Lib/dos-8x3/test_gdb.py | |
parent | d69a84b01eb802b2bfd7dd2c868a9b2da9465a5e (diff) | |
download | cpython-228b8e88bc7a7ce740e5c7326697e7c2256e099f.zip cpython-228b8e88bc7a7ce740e5c7326697e7c2256e099f.tar.gz cpython-228b8e88bc7a7ce740e5c7326697e7c2256e099f.tar.bz2 |
Whole lotta changes.
Diffstat (limited to 'Lib/dos-8x3/test_gdb.py')
-rw-r--r-- | Lib/dos-8x3/test_gdb.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Lib/dos-8x3/test_gdb.py b/Lib/dos-8x3/test_gdb.py new file mode 100644 index 0000000..22db6aa --- /dev/null +++ b/Lib/dos-8x3/test_gdb.py @@ -0,0 +1,34 @@ +#! /usr/bin/env python +"""Test script for the gdbm module + Roger E. Masse +""" + +import gdbm +from gdbm import error +from test_support import verbose + +filename= '/tmp/delete_me' + +g = gdbm.open(filename, 'c') +g['a'] = 'b' +g['12345678910'] = '019237410982340912840198242' +a = g.keys() +if verbose: + print 'Test gdbm file keys: ', a + +g.has_key('a') +g.close() +g = gdbm.open(filename, 'r') +g.close() +g = gdbm.open(filename, 'rw') +g.close() +g = gdbm.open(filename, 'w') +g.close() +g = gdbm.open(filename, 'n') +g.close() + +try: + import os + os.unlink(filename) +except: + pass |