mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Whole lotta changes.
This commit is contained in:
parent
d69a84b01e
commit
228b8e88bc
52 changed files with 2276 additions and 434 deletions
34
Lib/dos-8x3/test_gdb.py
Normal file
34
Lib/dos-8x3/test_gdb.py
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue