Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
f4c2fc6a
Commit
f4c2fc6a
authored
Apr 17, 2018
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qa: remove a few uses of 'chr'
parent
1316c225
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
neo/tests/client/testClientApp.py
neo/tests/client/testClientApp.py
+2
-3
neo/tests/stat_zodb.py
neo/tests/stat_zodb.py
+1
-1
No files found.
neo/tests/client/testClientApp.py
View file @
f4c2fc6a
...
...
@@ -21,6 +21,7 @@ from .. import NeoUnitTestBase, buildUrlFromString
from
neo.client.app
import
Application
from
neo.client.cache
import
test
as
testCache
from
neo.client.exception
import
NEOStorageError
from
neo.lib.util
import
p64
class
ClientApplicationTests
(
NeoUnitTestBase
):
...
...
@@ -51,9 +52,7 @@ class ClientApplicationTests(NeoUnitTestBase):
def
makeOID
(
self
,
value
=
None
):
from
random
import
randint
if
value
is
None
:
value
=
randint
(
1
,
255
)
return
'
\
00
'
*
7
+
chr
(
value
)
return
p64
(
randint
(
1
,
255
)
if
value
is
None
else
value
)
makeTID
=
makeOID
def
makeTransactionObject
(
self
,
user
=
'u'
,
description
=
'd'
,
_extension
=
'e'
):
...
...
neo/tests/stat_zodb.py
View file @
f4c2fc6a
...
...
@@ -22,7 +22,7 @@ PROD1 = lambda random=random: DummyZODB(6.04237779991, 1.55811487853,
def
DummyData
(
random
=
random
):
# returns data that gzip at about 28.5 %
# make sure sample is bigger than dictionary of compressor
data
=
''
.
join
(
chr
(
int
(
random
.
gauss
(
0
,
.
8
))
%
256
)
for
x
in
xrange
(
100000
))
data
=
bytearray
(
int
(
random
.
gauss
(
0
,
.
8
))
%
256
for
x
in
xrange
(
100000
))
return
StringIO
(
data
)
...
...
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