# 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
#
# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+
from nepi.execution.ec import ExperimentController
from nepi.execution.trace import TraceAttr
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()
stdout = ec.trace(simu, "stdout")
- print stdout
+ print(stdout)
expected = "20 packets transmitted, 20 received, 0% packet loss"
self.assertTrue(stdout.find(expected) > -1)