X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=test%2Fresources%2Flinux%2Fns3%2Fns3simulation.py;h=f00dcadee31fb9ac9be2d23d75dbe2540e01d116;hb=1d2350d56f314a6e3de43517a66f7e2f48128d44;hp=f663e1f92485e3b2836e7d75a5656261ae2837d3;hpb=d50ba1a08e541ded7a8b322493ebb1d0cc59c6ff;p=nepi.git diff --git a/test/resources/linux/ns3/ns3simulation.py b/test/resources/linux/ns3/ns3simulation.py index f663e1f9..f00dcade 100755 --- a/test/resources/linux/ns3/ns3simulation.py +++ b/test/resources/linux/ns3/ns3simulation.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,6 +17,8 @@ # # Author: Alina Quereilhac +from __future__ import print_function + from nepi.execution.ec import ExperimentController from nepi.execution.trace import TraceAttr @@ -473,16 +474,16 @@ class LinuxNS3SimulationTest(unittest.TestCase): output = ec.trace(guid, trace) size = ec.trace(guid, trace, attr = TraceAttr.SIZE) - self.assertEquals(size, len(output)) + self.assertEqual(size, len(output)) self.assertTrue(size > 100) block = ec.trace(guid, trace, attr = TraceAttr.STREAM, block = 5, offset = 1) - self.assertEquals(block, output[5:10]) + self.assertEqual(block, output[5:10]) trace_path = ec.trace(guid, trace, attr = TraceAttr.PATH) rm = ec.get_resource(guid) path = os.path.join(rm_simu.run_home, rm._trace_filename.get(trace)) - self.assertEquals(trace_path, path) + self.assertEqual(trace_path, path) ec.shutdown() @@ -745,7 +746,7 @@ class LinuxNS3SimulationTest(unittest.TestCase): stdout = ec.trace(simu, "stdout") - print stdout + print(stdout) expected = "20 packets transmitted, 20 received, 0% packet loss" self.assertTrue(stdout.find(expected) > -1)