X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=test%2Fresources%2Flinux%2Fnode.py;h=10f306a1a4b0a21a4adaa37c0f108ef29edc1f47;hb=cb5d027b813a27d7de263653e1a8e0cef5490f0a;hp=69222112e890488d528aa70500a0d94caa9981e9;hpb=2efd5eabeba8a6577ace9132d6336d44be0510e8;p=nepi.git diff --git a/test/resources/linux/node.py b/test/resources/linux/node.py index 69222112..10f306a1 100755 --- a/test/resources/linux/node.py +++ b/test/resources/linux/node.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 @@ -280,9 +279,8 @@ main (void) node.remove_packages("gcc", app_home) node.rmdir(app_home) - f = open(dst, "r") - out = f.read() - f.close() + with open(dst, "r") as f: + out = f.read() self.assertEquals(out, "Hello, world!\n") @@ -303,7 +301,7 @@ main (void) f1.close() f1.name - source = "%s;%s" % (dirpath, f1.name) + source = [dirpath, f1.name] destdir = "test" node.mkdir(destdir, clean = True) dest = "%s@%s:test" % (user, host)