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
systematic use of context managers for dealing with files instead of open()/close...
[nepi.git]
/
test
/
resources
/
linux
/
node.py
diff --git
a/test/resources/linux/node.py
b/test/resources/linux/node.py
index
11b66bb
..
10f306a
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.assertEquals(out, "Hello, world!\n")