Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
0e6012cb
Commit
0e6012cb
authored
Aug 22, 2007
by
Gregory P. Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eat some low hanging fruit... let the test suite run.
parent
ea03c116
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
7 deletions
+12
-7
Lib/bsddb/test/test_basics.py
Lib/bsddb/test/test_basics.py
+3
-2
Lib/bsddb/test/test_dbshelve.py
Lib/bsddb/test/test_dbshelve.py
+3
-1
Lib/bsddb/test/test_get_none.py
Lib/bsddb/test/test_get_none.py
+3
-2
Lib/bsddb/test/test_queue.py
Lib/bsddb/test/test_queue.py
+3
-2
No files found.
Lib/bsddb/test/test_basics.py
View file @
0e6012cb
...
@@ -23,7 +23,7 @@ except ImportError:
...
@@ -23,7 +23,7 @@ except ImportError:
from
.test_all
import
verbose
from
.test_all
import
verbose
DASH
=
b'-'
DASH
=
b'-'
letters
=
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
#----------------------------------------------------------------------
#----------------------------------------------------------------------
...
@@ -886,7 +886,7 @@ class BasicMultiDBTestCase(BasicTestCase):
...
@@ -886,7 +886,7 @@ class BasicMultiDBTestCase(BasicTestCase):
x
=
x
.
encode
(
"ascii"
)
x
=
x
.
encode
(
"ascii"
)
d2
.
put
(
x
,
self
.
makeData
(
x
))
d2
.
put
(
x
,
self
.
makeData
(
x
))
for
x
in
string
.
letters
:
for
x
in
letters
:
x
=
x
.
encode
(
"ascii"
)
x
=
x
.
encode
(
"ascii"
)
d3
.
put
(
x
,
x
*
70
)
d3
.
put
(
x
,
x
*
70
)
...
@@ -942,6 +942,7 @@ class BasicMultiDBTestCase(BasicTestCase):
...
@@ -942,6 +942,7 @@ class BasicMultiDBTestCase(BasicTestCase):
c2
.
close
()
c2
.
close
()
c3
.
close
()
c3
.
close
()
d1
.
close
()
d2
.
close
()
d2
.
close
()
d3
.
close
()
d3
.
close
()
...
...
Lib/bsddb/test/test_dbshelve.py
View file @
0e6012cb
...
@@ -37,6 +37,8 @@ class DataClass:
...
@@ -37,6 +37,8 @@ class DataClass:
other
=
other
.
value
other
=
other
.
value
return
value
<
other
return
value
<
other
letters
=
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
class
DBShelveTestCase
(
unittest
.
TestCase
):
class
DBShelveTestCase
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
self
.
filename
=
tempfile
.
mktemp
()
self
.
filename
=
tempfile
.
mktemp
()
...
@@ -50,7 +52,7 @@ class DBShelveTestCase(unittest.TestCase):
...
@@ -50,7 +52,7 @@ class DBShelveTestCase(unittest.TestCase):
pass
pass
def
populateDB
(
self
,
d
):
def
populateDB
(
self
,
d
):
for
x
in
string
.
letters
:
for
x
in
letters
:
d
[(
'S'
+
x
).
encode
(
"ascii"
)]
=
10
*
x
# add a string
d
[(
'S'
+
x
).
encode
(
"ascii"
)]
=
10
*
x
# add a string
d
[(
'I'
+
x
).
encode
(
"ascii"
)]
=
ord
(
x
)
# add an integer
d
[(
'I'
+
x
).
encode
(
"ascii"
)]
=
ord
(
x
)
# add an integer
d
[(
'L'
+
x
).
encode
(
"ascii"
)]
=
[
x
]
*
10
# add a list
d
[(
'L'
+
x
).
encode
(
"ascii"
)]
=
[
x
]
*
10
# add a list
...
...
Lib/bsddb/test/test_get_none.py
View file @
0e6012cb
...
@@ -11,6 +11,7 @@ from bsddb import db
...
@@ -11,6 +11,7 @@ from bsddb import db
from
.test_all
import
verbose
from
.test_all
import
verbose
letters
=
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
#----------------------------------------------------------------------
#----------------------------------------------------------------------
...
@@ -30,7 +31,7 @@ class GetReturnsNoneTestCase(unittest.TestCase):
...
@@ -30,7 +31,7 @@ class GetReturnsNoneTestCase(unittest.TestCase):
d
.
open
(
self
.
filename
,
db
.
DB_BTREE
,
db
.
DB_CREATE
)
d
.
open
(
self
.
filename
,
db
.
DB_BTREE
,
db
.
DB_CREATE
)
d
.
set_get_returns_none
(
1
)
d
.
set_get_returns_none
(
1
)
for
x
in
string
.
letters
:
for
x
in
letters
:
x
=
x
.
encode
(
"ascii"
)
x
=
x
.
encode
(
"ascii"
)
d
.
put
(
x
,
x
*
40
)
d
.
put
(
x
,
x
*
40
)
...
@@ -59,7 +60,7 @@ class GetReturnsNoneTestCase(unittest.TestCase):
...
@@ -59,7 +60,7 @@ class GetReturnsNoneTestCase(unittest.TestCase):
d
.
open
(
self
.
filename
,
db
.
DB_BTREE
,
db
.
DB_CREATE
)
d
.
open
(
self
.
filename
,
db
.
DB_BTREE
,
db
.
DB_CREATE
)
d
.
set_get_returns_none
(
0
)
d
.
set_get_returns_none
(
0
)
for
x
in
string
.
letters
:
for
x
in
letters
:
x
=
x
.
encode
(
"ascii"
)
x
=
x
.
encode
(
"ascii"
)
d
.
put
(
x
,
x
*
40
)
d
.
put
(
x
,
x
*
40
)
...
...
Lib/bsddb/test/test_queue.py
View file @
0e6012cb
...
@@ -16,6 +16,7 @@ except ImportError:
...
@@ -16,6 +16,7 @@ except ImportError:
from
.test_all
import
verbose
from
.test_all
import
verbose
letters
=
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
#----------------------------------------------------------------------
#----------------------------------------------------------------------
...
@@ -45,7 +46,7 @@ class SimpleQueueTestCase(unittest.TestCase):
...
@@ -45,7 +46,7 @@ class SimpleQueueTestCase(unittest.TestCase):
print
(
"before appends"
+
'-'
*
30
)
print
(
"before appends"
+
'-'
*
30
)
pprint
(
d
.
stat
())
pprint
(
d
.
stat
())
for
x
in
string
.
letters
:
for
x
in
letters
:
d
.
append
(
x
*
40
)
d
.
append
(
x
*
40
)
assert
len
(
d
)
==
52
assert
len
(
d
)
==
52
...
@@ -117,7 +118,7 @@ class SimpleQueueTestCase(unittest.TestCase):
...
@@ -117,7 +118,7 @@ class SimpleQueueTestCase(unittest.TestCase):
print
(
"before appends"
+
'-'
*
30
)
print
(
"before appends"
+
'-'
*
30
)
pprint
(
d
.
stat
())
pprint
(
d
.
stat
())
for
x
in
string
.
letters
:
for
x
in
letters
:
d
.
append
(
x
*
40
)
d
.
append
(
x
*
40
)
assert
len
(
d
)
==
52
assert
len
(
d
)
==
52
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment