From 7b63fc3c251725270516572ec1663d7b5157fca0 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sun, 12 Mar 2017 19:46:59 -0400 Subject: switch to use must_match, mode=r, and get rid of rb/wb --- test/ENV.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/ENV.py b/test/ENV.py index 5cb2362..326f8c5 100644 --- a/test/ENV.py +++ b/test/ENV.py @@ -50,16 +50,18 @@ test.write('build.py', r"""#!/usr/bin/env python import os import sys -contents = open(sys.argv[2], 'rb').read() -open(sys.argv[1], 'wb').write("build.py %s\n%s" % (os.environ['X'], contents)) +contents = open(sys.argv[2], 'r').read() +open(sys.argv[1], 'w').write("build.py %s\n%s" % (os.environ['X'], contents)) """) test.write('input', "input file\n") test.run(arguments = '.') -test.fail_test(test.read('env1.out') != "build.py env1\ninput file\n") -test.fail_test(test.read('env2.out') != "build.py env2\ninput file\n") +test.must_match('env1.out', "build.py env1\ninput file\n", mode='r') +# test.fail_test(test.read('env1.out') != "build.py env1\ninput file\n") +test.must_match('env2.out', "build.py env2\ninput file\n", mode='r') +# test.fail_test(test.read('env2.out') != "build.py env2\ninput file\n") test.write('SConstruct', """ -- cgit v0.12