git://git.onelab.eu
/
nepi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
cherry picked cb5d027b about context managers
[nepi.git]
/
test
/
resources
/
linux
/
node.py
diff --git
a/test/resources/linux/node.py
b/test/resources/linux/node.py
index
23c6f59
..
c9fb8ae
100755
(executable)
--- a/
test/resources/linux/node.py
+++ b/
test/resources/linux/node.py
@@
-279,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.assertEqual(out, "Hello, world!\n")