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
22525de7
Commit
22525de7
authored
Jun 19, 2018
by
Serhiy Storchaka
Committed by
GitHub
Jun 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use more specific asserts in dbm tests. (GH-7786)
This may help to investigate bpo-33901.
parent
fc93bd46
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
Lib/test/test_dbm.py
Lib/test/test_dbm.py
+1
-1
Lib/test/test_dbm_gnu.py
Lib/test/test_dbm_gnu.py
+3
-2
No files found.
Lib/test/test_dbm.py
View file @
22525de7
...
...
@@ -160,7 +160,7 @@ class WhichDBTestCase(unittest.TestCase):
# and test that we can find it
self
.
assertIn
(
b"1"
,
f
)
# and read it
self
.
assert
True
(
f
[
b"1"
]
==
b"1"
)
self
.
assert
Equal
(
f
[
b"1"
],
b"1"
)
f
.
close
()
self
.
assertEqual
(
name
,
self
.
dbm
.
whichdb
(
_fname
))
...
...
Lib/test/test_dbm_gnu.py
View file @
22525de7
...
...
@@ -74,7 +74,7 @@ class TestGdbm(unittest.TestCase):
self
.
g
[
'x'
]
=
'x'
*
10000
size1
=
os
.
path
.
getsize
(
filename
)
self
.
assert
True
(
size0
<
size1
)
self
.
assert
Greater
(
size1
,
size0
)
del
self
.
g
[
'x'
]
# 'size' is supposed to be the same even after deleting an entry.
...
...
@@ -82,7 +82,8 @@ class TestGdbm(unittest.TestCase):
self
.
g
.
reorganize
()
size2
=
os
.
path
.
getsize
(
filename
)
self
.
assertTrue
(
size1
>
size2
>=
size0
)
self
.
assertLess
(
size2
,
size1
)
self
.
assertGreaterEqual
(
size2
,
size0
)
def
test_context_manager
(
self
):
with
gdbm
.
open
(
filename
,
'c'
)
as
db
:
...
...
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