Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BTrees
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
BTrees
Commits
2c430dd2
Commit
2c430dd2
authored
Sep 14, 2018
by
Jason Madden
Committed by
GitHub
Sep 14, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #95 from zopefoundation/issue94
Fix tests against persistent 4.4.
parents
7b6c79b7
bbeb7ca1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
BTrees/tests/common.py
BTrees/tests/common.py
+17
-4
CHANGES.rst
CHANGES.rst
+1
-1
setup.py
setup.py
+3
-0
No files found.
BTrees/tests/common.py
View file @
2c430dd2
...
...
@@ -365,6 +365,7 @@ class MappingBase(Base):
t
=
self
.
_makeOne
()
for
i
in
range
(
5
):
t
[
i
]
=
i
t
.
_p_oid
=
b'12345678'
r
=
repr
(
t
)
# Make sure the repr is **not* 10000 bytes long for a shrort bucket.
# (the buffer must be terminated when copied).
...
...
@@ -374,9 +375,15 @@ class MappingBase(Base):
self
.
assertTrue
(
r
.
startswith
(
"BTrees"
))
self
.
assertTrue
(
r
.
endswith
(
repr
(
t
.
items
())
+
')'
),
r
)
else
:
self
.
assertEqual
(
r
[:
8
],
'<BTrees.'
)
# persistent-4.4 changed the default reprs, adding
# oid and jar reprs, but eliminating the module prefix
# in one implementation
self
.
assertIn
(
'BTree object at'
,
r
)
self
.
assertIn
(
'oid'
,
r
)
self
.
assertIn
(
'12345678'
,
r
)
# Make sure it's the same between Python and C
self
.
assert
True
(
'Py'
not
in
r
)
self
.
assert
NotIn
(
'Py'
,
r
)
def
testRepr
(
self
):
# test the repr because buckets have a complex repr implementation
...
...
@@ -1379,6 +1386,7 @@ class NormalSetTests(Base):
t
=
self
.
_makeOne
()
for
i
in
range
(
5
):
t
.
add
(
i
)
t
.
_p_oid
=
b'12345678'
r
=
repr
(
t
)
# Make sure the repr is **not* 10000 bytes long for a shrort bucket.
# (the buffer must be terminated when copied).
...
...
@@ -1387,9 +1395,14 @@ class NormalSetTests(Base):
if
'TreeSet'
not
in
r
:
self
.
assertTrue
(
r
.
endswith
(
"Set(%r)"
%
t
.
keys
()))
else
:
self
.
assertEqual
(
r
[:
7
],
'<BTrees'
,
r
)
# persistent-4.4 changed the default reprs, adding
# oid and jar reprs, but eliminating the module prefix
# in one implementation
self
.
assertIn
(
'TreeSet object at'
,
r
)
self
.
assertIn
(
'oid'
,
r
)
self
.
assertIn
(
'12345678'
,
r
)
# Make sure it's the same between Python and C
self
.
assert
True
(
'Py'
not
in
r
)
self
.
assert
NotIn
(
'Py'
,
r
)
def
testInsertReturnsValue
(
self
):
...
...
CHANGES.rst
View file @
2c430dd2
...
...
@@ -4,7 +4,7 @@
4.5.2 (unreleased)
------------------
-
Nothing changed yet
.
-
Fix tests against persistent 4.4
.
4.5.1 (2018-08-09)
...
...
setup.py
View file @
2c430dd2
...
...
@@ -138,6 +138,9 @@ REQUIRES = [
]
TESTS_REQUIRE
=
[
# Our tests check for the new repr strings
# generated in persistent 4.4.
'persistent >= 4.4.2'
,
'transaction'
,
'zope.testrunner'
,
]
...
...
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