X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=test%2Fresources%2Flinux%2Fapplication.py;h=cdd6fe7f8aa43d829f427aee854c8ae9ca355693;hb=1d2350d56f314a6e3de43517a66f7e2f48128d44;hp=b6ccb6f125d01e0e5bd1ee4b28f87619fda100bc;hpb=d50ba1a08e541ded7a8b322493ebb1d0cc59c6ff;p=nepi.git diff --git a/test/resources/linux/application.py b/test/resources/linux/application.py index b6ccb6f1..cdd6fe7f 100755 --- a/test/resources/linux/application.py +++ b/test/resources/linux/application.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 @@ -94,15 +93,15 @@ class LinuxApplicationTestCase(unittest.TestCase): stdout = ec.trace(app, "stdout") size = ec.trace(app, "stdout", attr = TraceAttr.SIZE) - self.assertEquals(len(stdout), size) + self.assertEqual(len(stdout), size) block = ec.trace(app, "stdout", attr = TraceAttr.STREAM, block = 5, offset = 1) - self.assertEquals(block, stdout[5:10]) + self.assertEqual(block, stdout[5:10]) path = ec.trace(app, "stdout", attr = TraceAttr.PATH) rm = ec.get_resource(app) p = os.path.join(rm.run_home, "stdout") - self.assertEquals(path, p) + self.assertEqual(path, p) ec.shutdown() @@ -141,7 +140,7 @@ main (void) ec.wait_finished(app) out = ec.trace(app, 'stdout') - self.assertEquals(out, "Hello, world!\n") + self.assertEqual(out, "Hello, world!\n") ec.shutdown() @@ -157,7 +156,7 @@ main (void) ec.set(node, "cleanProcesses", True) apps = list() - for i in xrange(50): + for i in range(50): app = ec.register_resource("linux::Application") cmd = "ping -c5 %s" % self.target ec.set(app, "command", cmd) @@ -177,15 +176,15 @@ main (void) for app in apps: stdout = ec.trace(app, 'stdout') size = ec.trace(app, 'stdout', attr = TraceAttr.SIZE) - self.assertEquals(len(stdout), size) + self.assertEqual(len(stdout), size) block = ec.trace(app, 'stdout', attr = TraceAttr.STREAM, block = 5, offset = 1) - self.assertEquals(block, stdout[5:10]) + self.assertEqual(block, stdout[5:10]) path = ec.trace(app, 'stdout', attr = TraceAttr.PATH) rm = ec.get_resource(app) p = os.path.join(rm.run_home, 'stdout') - self.assertEquals(path, p) + self.assertEqual(path, p) ec.shutdown()