diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-03-24 14:55:07 -0700 |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-03-24 14:55:07 -0700 |
commit | d099888c2be6d65870987c70eace995d7e34241b (patch) | |
tree | ad47b56bdf48d6e19f3c7d5edb274fc92c40fb49 /test/redirection.py | |
parent | 2e593b9d2b58f34ef34b1b56bb13945849950112 (diff) | |
download | scons-d099888c2be6d65870987c70eace995d7e34241b.tar.gz |
fix py2/3. Also fix py2 win32 broken tests
Diffstat (limited to 'test/redirection.py')
-rw-r--r-- | test/redirection.py | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/test/redirection.py b/test/redirection.py index cc8ebf92..ffc76b5f 100644 --- a/test/redirection.py +++ b/test/redirection.py @@ -33,15 +33,10 @@ test = TestSCons.TestSCons() test.write('cat.py', r""" import sys try: - input = open(sys.argv[1], 'rb').read() - try: - sys.stdout.buffer.write(input) - except AttributeError: - sys.stdout.write(input) + input = open(sys.argv[1], 'r').read() except IndexError: input = sys.stdin.read() - sys.stdout.write(input) - +sys.stdout.write(input) sys.exit(0) """) @@ -57,10 +52,10 @@ env.Command(target='foo4', source='bar4', action=r'%(_python_)s cat.py <$SOURCES |%(_python_)s cat.py >$TARGET') """ % locals()) -test.write('bar1', 'bar1\r\n', mode='w') -test.write('bar2', 'bar2\r\n', mode='w') -test.write('bar3', 'bar3\r\n', mode='w') -test.write('bar4', 'bar4\r\n', mode='w') +test.write('bar1', 'bar1\r\n') +test.write('bar2', 'bar2\r\n') +test.write('bar3', 'bar3\r\n') +test.write('bar4', 'bar4\r\n') test.run(arguments='.') |