summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-03-12 23:06:43 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2017-03-12 23:06:43 (GMT)
commitd8c8ae8fd87952d4cb334c4a634087503c40673e (patch)
tree7d57f70a9db535e080dd6e245d07c59ea3ec1a5c /test
parent63da1b9c6083285e5c4d92126ad2e173d34cef6b (diff)
downloadSCons-d8c8ae8fd87952d4cb334c4a634087503c40673e.zip
SCons-d8c8ae8fd87952d4cb334c4a634087503c40673e.tar.gz
SCons-d8c8ae8fd87952d4cb334c4a634087503c40673e.tar.bz2
py2/3 mode=r and swap to use must_match
Diffstat (limited to 'test')
-rw-r--r--test/CXX/SHCXX.py3
-rw-r--r--test/CommandGenerator.py10
2 files changed, 7 insertions, 6 deletions
diff --git a/test/CXX/SHCXX.py b/test/CXX/SHCXX.py
index d6a314e..0d1ad36 100644
--- a/test/CXX/SHCXX.py
+++ b/test/CXX/SHCXX.py
@@ -73,7 +73,8 @@ test.fail_test(os.path.exists(test.workpath('wrapper.out')))
test.run(arguments = 'bar')
-test.fail_test(test.read('wrapper.out') != "wrapper.py\n")
+test.must_match('wrapper.out', "wrapper.py\n", mode='r')
+# test.fail_test(test.read('wrapper.out') != "wrapper.py\n")
test.pass_test()
diff --git a/test/CommandGenerator.py b/test/CommandGenerator.py
index 063999d..a3a995b 100644
--- a/test/CommandGenerator.py
+++ b/test/CommandGenerator.py
@@ -34,8 +34,8 @@ test = TestSCons.TestSCons()
test.write('build.py', r"""
import sys
-contents = open(sys.argv[2], 'rb').read()
-file = open(sys.argv[1], 'wb')
+contents = open(sys.argv[2], 'r').read()
+file = open(sys.argv[1], 'w')
file.write(contents)
file.close()
sys.exit(0)
@@ -64,9 +64,9 @@ test.write('foo3.in', "foo3.in\n")
test.run(arguments = 'foo1.out foo2.out foo3.out')
-test.fail_test(test.read(test.workpath('foo1.out')) != "foo1.in\n")
-test.fail_test(test.read(test.workpath('foo2.out')) != "foo2.in\n")
-test.fail_test(test.read(test.workpath('foo3.out')) != "foo3.in\n")
+test.must_match('foo1.out','foo1.in\n', mode='r')
+test.must_match('foo2.out','foo2.in\n', mode='r')
+test.must_match('foo3.out','foo3.in\n', mode='r')
test.pass_test()