git://git.onelab.eu
/
nepi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use print() - import print_function - should be fine for both py2 and py3
[nepi.git]
/
test
/
resources
/
omf
/
set_hook.py
diff --git
a/test/resources/omf/set_hook.py
b/test/resources/omf/set_hook.py
index
c297aff
..
f515f1e
100755
(executable)
--- a/
test/resources/omf/set_hook.py
+++ b/
test/resources/omf/set_hook.py
@@
-17,8
+17,10
@@
#
# Author: Julien Tribino <julien.tribino@inria.fr>
#
# Author: Julien Tribino <julien.tribino@inria.fr>
+from __future__ import print_function
-from nepi.execution.resource import ResourceFactory, clsinit_copy, ResourceManager, ResourceAction, ResourceState
+from nepi.execution.resource import (ResourceFactory, clsinit_copy,
+ ResourceManager, ResourceAction, ResourceState)
from nepi.execution.ec import ExperimentController
from nepi.execution.attribute import Attribute, Flags
from nepi.execution.ec import ExperimentController
from nepi.execution.attribute import Attribute, Flags
@@
-45,7
+47,7
@@
class OMFDummyApplication(OMFApplication):
@classmethod
def test_hook(cls, old_value, new_value):
new_value *= 10
@classmethod
def test_hook(cls, old_value, new_value):
new_value *= 10
- print
"Change the value of test from "+ str(old_value) +" to : " + str(new_value
)
+ print
("Change the value of test from "+ str(old_value) +" to : " + str(new_value)
)
return new_value
return new_value
@@
-80,13
+82,13
@@
class OMFTestSet(unittest.TestCase):
self.ec.deploy()
time.sleep(3)
self.ec.deploy()
time.sleep(3)
- print
"First try to change the STDIN"
+ print
("First try to change the STDIN")
self.ec.set(self.app1, 'test', 3)
self.assertEquals(self.ec.get(self.app1, 'test'), 30)
time.sleep(3)
self.ec.set(self.app1, 'test', 3)
self.assertEquals(self.ec.get(self.app1, 'test'), 30)
time.sleep(3)
- print
"Second try to change the STDIN"
+ print
("Second try to change the STDIN")
self.ec.set(self.app1, 'test', 101)
self.assertEquals(self.ec.get(self.app1, 'test'), 1010)
self.ec.set(self.app1, 'test', 101)
self.assertEquals(self.ec.get(self.app1, 'test'), 1010)