Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
c67a23bc
Commit
c67a23bc
authored
Aug 20, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Commas must be followed by a space.
Found by pylint.
parent
5411b09f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
5 deletions
+6
-5
neo/client/cache.py
neo/client/cache.py
+1
-1
neo/tests/__init__.py
neo/tests/__init__.py
+3
-2
neo/tests/master/testStorageHandler.py
neo/tests/master/testStorageHandler.py
+1
-1
neo/tests/master/testVerification.py
neo/tests/master/testVerification.py
+1
-1
No files found.
neo/client/cache.py
View file @
c67a23bc
...
@@ -254,7 +254,7 @@ def test(self):
...
@@ -254,7 +254,7 @@ def test(self):
self
.
assertEqual
(
cache
.
load
(
1
,
20
),
(
'15'
,
15
,
20
))
self
.
assertEqual
(
cache
.
load
(
1
,
20
),
(
'15'
,
15
,
20
))
cache
.
store
(
1
,
'10'
,
10
,
15
)
cache
.
store
(
1
,
'10'
,
10
,
15
)
cache
.
store
(
1
,
'20'
,
20
,
21
)
cache
.
store
(
1
,
'20'
,
20
,
21
)
self
.
assertEqual
([
5
,
10
,
15
,
20
],
[
x
.
tid
for
x
in
cache
.
_oid_dict
[
1
]])
self
.
assertEqual
([
5
,
10
,
15
,
20
],
[
x
.
tid
for
x
in
cache
.
_oid_dict
[
1
]])
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
import
unittest
import
unittest
...
...
neo/tests/__init__.py
View file @
c67a23bc
...
@@ -126,7 +126,8 @@ class NeoTestBase(unittest.TestCase):
...
@@ -126,7 +126,8 @@ class NeoTestBase(unittest.TestCase):
test_case
,
logging
.
name
=
self
.
id
().
rsplit
(
'.'
,
1
)
test_case
,
logging
.
name
=
self
.
id
().
rsplit
(
'.'
,
1
)
logging
.
setup
(
os
.
path
.
join
(
getTempDirectory
(),
test_case
+
'.log'
))
logging
.
setup
(
os
.
path
.
join
(
getTempDirectory
(),
test_case
+
'.log'
))
def
tearDown
(
self
,
success
=
'ok'
if
sys
.
version_info
<
(
2
,
7
)
else
'success'
):
def
tearDown
(
self
,
success
=
'ok'
if
sys
.
version_info
<
(
2
,
7
)
else
'success'
):
assert
self
.
tearDown
.
im_func
is
NeoTestBase
.
tearDown
.
im_func
assert
self
.
tearDown
.
im_func
is
NeoTestBase
.
tearDown
.
im_func
self
.
_tearDown
(
sys
.
_getframe
(
1
).
f_locals
[
success
])
self
.
_tearDown
(
sys
.
_getframe
(
1
).
f_locals
[
success
])
...
@@ -529,7 +530,7 @@ def _fixMockForInspect():
...
@@ -529,7 +530,7 @@ def _fixMockForInspect():
# _setupSubclassMethodInterceptors is under the FreeBSD license.
# _setupSubclassMethodInterceptors is under the FreeBSD license.
# See pyMock module for the whole license.
# See pyMock module for the whole license.
def
_setupSubclassMethodInterceptors
(
self
):
def
_setupSubclassMethodInterceptors
(
self
):
methods
=
inspect
.
getmembers
(
self
.
__class__
,
inspect
.
isroutine
)
methods
=
inspect
.
getmembers
(
self
.
__class__
,
inspect
.
isroutine
)
baseMethods
=
dict
(
inspect
.
getmembers
(
Mock
,
inspect
.
isroutine
))
baseMethods
=
dict
(
inspect
.
getmembers
(
Mock
,
inspect
.
isroutine
))
for
m
in
methods
:
for
m
in
methods
:
name
=
m
[
0
]
name
=
m
[
0
]
...
...
neo/tests/master/testStorageHandler.py
View file @
c67a23bc
...
@@ -63,7 +63,7 @@ class MasterStorageHandlerTests(NeoUnitTestBase):
...
@@ -63,7 +63,7 @@ class MasterStorageHandlerTests(NeoUnitTestBase):
uuid
=
self
.
getNewUUID
(
node_type
)
uuid
=
self
.
getNewUUID
(
node_type
)
node
=
nm
.
createFromNodeType
(
node_type
,
address
=
(
ip
,
port
),
node
=
nm
.
createFromNodeType
(
node_type
,
address
=
(
ip
,
port
),
uuid
=
uuid
)
uuid
=
uuid
)
conn
=
self
.
getFakeConnection
(
node
.
getUUID
(),
node
.
getAddress
())
conn
=
self
.
getFakeConnection
(
node
.
getUUID
(),
node
.
getAddress
())
node
.
setConnection
(
conn
)
node
.
setConnection
(
conn
)
return
(
node
,
conn
)
return
(
node
,
conn
)
...
...
neo/tests/master/testVerification.py
View file @
c67a23bc
...
@@ -64,7 +64,7 @@ class MasterVerificationTests(NeoUnitTestBase):
...
@@ -64,7 +64,7 @@ class MasterVerificationTests(NeoUnitTestBase):
conn
=
self
.
getFakeConnection
(
uuid
,
self
.
storage_address
)
conn
=
self
.
getFakeConnection
(
uuid
,
self
.
storage_address
)
self
.
assertEqual
(
self
.
app
.
nm
.
getByAddress
(
conn
.
getAddress
()).
getState
(),
self
.
assertEqual
(
self
.
app
.
nm
.
getByAddress
(
conn
.
getAddress
()).
getState
(),
NodeStates
.
UNKNOWN
)
NodeStates
.
UNKNOWN
)
self
.
assertRaises
(
VerificationFailure
,
self
.
verification
.
connectionClosed
,
conn
)
self
.
assertRaises
(
VerificationFailure
,
self
.
verification
.
connectionClosed
,
conn
)
self
.
assertEqual
(
self
.
app
.
nm
.
getByAddress
(
conn
.
getAddress
()).
getState
(),
self
.
assertEqual
(
self
.
app
.
nm
.
getByAddress
(
conn
.
getAddress
()).
getState
(),
NodeStates
.
TEMPORARILY_DOWN
)
NodeStates
.
TEMPORARILY_DOWN
)
...
...
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