summaryrefslogtreecommitdiffstats
path: root/test/FindFile.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/FindFile.py')
-rw-r--r--test/FindFile.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/FindFile.py b/test/FindFile.py
index e878172..fa195c4 100644
--- a/test/FindFile.py
+++ b/test/FindFile.py
@@ -40,13 +40,17 @@ test.write(['bar', 'baz', 'testfile2'], 'test 4\n')
test.write('SConstruct', """
env = Environment(FILE = 'file', BAR = 'bar')
file1 = FindFile('testfile1', [ 'foo', '.', 'bar', 'bar/baz' ])
-print(open(str(file1), 'r').read())
+with open(str(file1), 'r') as f:
+ print(f.read())
file2 = env.FindFile('test${FILE}1', [ 'bar', 'foo', '.', 'bar/baz' ])
-print(open(str(file2), 'r').read())
+with open(str(file2), 'r') as f:
+ print(f.read())
file3 = FindFile('testfile2', [ 'foo', '.', 'bar', 'bar/baz' ])
-print(open(str(file3), 'r').read())
+with open(str(file3), 'r') as f:
+ print(f.read())
file4 = env.FindFile('testfile2', [ '$BAR/baz', 'foo', '.', 'bar' ])
-print(open(str(file4), 'r').read())
+with open(str(file4), 'r') as f:
+ print(f.read())
""")
expect = test.wrap_stdout(read_str = """test 1