diff options
author | Craig Rodrigues <rodrigc@FreeBSD.org> | 2017-03-14 00:46:47 -0700 |
---|---|---|
committer | Craig Rodrigues <rodrigc@FreeBSD.org> | 2017-03-14 00:46:47 -0700 |
commit | 743f42a1559e5d1d73e1c8cca6fe82d72e336bc3 (patch) | |
tree | bbbc02056e494a22b4b9da5bd5e6a3c04c34b9c0 /test/overrides.py | |
parent | d16199f99b05bea601125f623ea037f4cb2e4d1a (diff) | |
download | scons-743f42a1559e5d1d73e1c8cca6fe82d72e336bc3.tar.gz |
Use mode='r' to fix tests on Python 3.
Diffstat (limited to 'test/overrides.py')
-rw-r--r-- | test/overrides.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/overrides.py b/test/overrides.py index 69d5207e..343cea47 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!' |