X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=test%2Fresources%2Fomf%2Fset_hook.py;h=1ac069302e790c39b35ebce5c3f052ce38263047;hb=1d2350d56f314a6e3de43517a66f7e2f48128d44;hp=5aa77c77e6e5734e4c5367ea1b74fe7f6d95ca08;hpb=d50ba1a08e541ded7a8b322493ebb1d0cc59c6ff;p=nepi.git diff --git a/test/resources/omf/set_hook.py b/test/resources/omf/set_hook.py index 5aa77c77..1ac06930 100755 --- a/test/resources/omf/set_hook.py +++ b/test/resources/omf/set_hook.py @@ -4,9 +4,8 @@ # Copyright (C) 2013 INRIA # # This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation; # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -18,8 +17,10 @@ # # Author: Julien Tribino +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 @@ -46,7 +47,7 @@ class OMFDummyApplication(OMFApplication): @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 @@ -81,15 +82,15 @@ class OMFTestSet(unittest.TestCase): 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) + self.assertEqual(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.assertEqual(self.ec.get(self.app1, 'test'), 1010) self.ec.wait_finished([self.app1])