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
2d5492bd
Commit
2d5492bd
authored
Dec 10, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use bytes literals for _p_oid values.
parent
0e821686
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
BTrees/tests/test__base.py
BTrees/tests/test__base.py
+3
-3
BTrees/tests/test_check.py
BTrees/tests/test_check.py
+2
-2
No files found.
BTrees/tests/test__base.py
View file @
2d5492bd
...
...
@@ -1783,7 +1783,7 @@ class Test_Tree(unittest.TestCase):
def
test__set_calls_readCurrent_on_jar
(
self
):
tree
=
self
.
_makeOne
()
tree
.
_p_oid
=
'OID'
tree
.
_p_oid
=
b
'OID'
tree
.
_p_serial
=
'01234567'
tree
.
_p_jar
=
jar
=
_Jar
()
tree
.
_set
(
'a'
,
'b'
)
...
...
@@ -1839,7 +1839,7 @@ class Test_Tree(unittest.TestCase):
def
test__del_calls_readCurrent_on_jar
(
self
):
tree
=
self
.
_makeOne
({
'a'
:
'b'
})
tree
.
_p_oid
=
'OID'
tree
.
_p_oid
=
b
'OID'
tree
.
_p_serial
=
'01234567'
tree
.
_p_jar
=
jar
=
_Jar
()
tree
.
_del
(
'a'
)
...
...
@@ -1898,7 +1898,7 @@ class Test_Tree(unittest.TestCase):
bucket
=
tree
.
_firstbucket
jar
=
_Jar
()
bucket
.
_p_jar
=
jar
bucket
.
_p_oid
=
'OID'
bucket
.
_p_oid
=
b
'OID'
self
.
assertEqual
(
tree
.
__getstate__
(),
((
bucket
,),
bucket
))
def
test___getstate___multiple_buckets
(
self
):
...
...
BTrees/tests/test_check.py
View file @
2d5492bd
...
...
@@ -149,10 +149,10 @@ class Test_type_and_adr(unittest.TestCase):
def
test_type_and_adr_w_oid
(
self
):
from
BTrees.utils
import
oid_repr
class
WithOid
(
object
):
_p_oid
=
'DEADBEEF'
_p_oid
=
b
'DEADBEEF'
t_and_a
=
self
.
_callFUT
(
WithOid
())
self
.
assertTrue
(
t_and_a
.
startswith
(
'WithOid (0x'
))
self
.
assertTrue
(
t_and_a
.
endswith
(
'oid=%s)'
%
oid_repr
(
'DEADBEEF'
)))
self
.
assertTrue
(
t_and_a
.
endswith
(
'oid=%s)'
%
oid_repr
(
b
'DEADBEEF'
)))
def
test_type_and_adr_wo_oid
(
self
):
class
WithoutOid
(
object
):
...
...
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