summaryrefslogtreecommitdiffstats
path: root/test/overrides.py
diff options
context:
space:
mode:
authorCraig Rodrigues <rodrigc@FreeBSD.org>2017-03-14 07:46:47 (GMT)
committerCraig Rodrigues <rodrigc@FreeBSD.org>2017-03-14 07:46:47 (GMT)
commit948fe88f6115b50958f01dc5c065132bb27b5ed6 (patch)
treebbbc02056e494a22b4b9da5bd5e6a3c04c34b9c0 /test/overrides.py
parent2d18dafe7492488b94756146cbdae72d66f9a2bb (diff)
downloadSCons-948fe88f6115b50958f01dc5c065132bb27b5ed6.zip
SCons-948fe88f6115b50958f01dc5c065132bb27b5ed6.tar.gz
SCons-948fe88f6115b50958f01dc5c065132bb27b5ed6.tar.bz2
Use mode='r' to fix tests on Python 3.
Diffstat (limited to 'test/overrides.py')
-rw-r--r--test/overrides.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/overrides.py b/test/overrides.py
index 69d5207..343cea4 100644
--- a/test/overrides.py
+++ b/test/overrides.py
@@ -77,17 +77,17 @@ env.Program('hello', 'hello.c',
test.write('hello.c',"this ain't no c file!\n")
test.write('mycc.py',"""
-open('hello.not_obj', 'wt').write('this is no object file!')
+open('hello.not_obj', 'w').write('this is no object file!')
""")
test.write('mylink.py',"""
-open('hello.not_exe', 'wt').write('this is not a program!')
+open('hello.not_exe', 'w').write('this is not a program!')
""")
test.run(arguments='hello.not_exe')
-assert test.read('hello.not_obj') == 'this is no object file!'
-assert test.read('hello.not_exe') == 'this is not a program!'
+assert test.read('hello.not_obj', mode='r') == 'this is no object file!'
+assert test.read('hello.not_exe', mode='r') == 'this is not a program!'
test.up_to_date(arguments='hello.not_exe')
@@ -121,8 +121,8 @@ scons: warning: Did you mean to use `(target|source)' instead of `(targets|sourc
scons: warning: Did you mean to use `(target|source)' instead of `(targets|sources)'\?
""" + TestSCons.file_expr))
-assert test.read('goodbye.not_obj') == 'this is no object file!'
-assert test.read('goodbye.not_exe') == 'this is not a program!'
+assert test.read('goodbye.not_obj', mode='r') == 'this is no object file!'
+assert test.read('goodbye.not_exe', mode='r') == 'this is not a program!'