summaryrefslogtreecommitdiff
path: root/test/Copy-Action.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-03-20 10:49:53 -0700
committerWilliam Deegan <bill@baddogconsulting.com>2017-03-20 10:49:53 -0700
commit9ba0445c53be4f0132a8b9dc0d68645db422ffd6 (patch)
tree9183489a20aa6be1120253a5edab54ef1e8252b2 /test/Copy-Action.py
parent5708cdb78937b6672c72de6a92d50a456bbf9eb0 (diff)
downloadscons-9ba0445c53be4f0132a8b9dc0d68645db422ffd6.tar.gz
py2/3 doesn't fix py3 yet.
Diffstat (limited to 'test/Copy-Action.py')
-rw-r--r--test/Copy-Action.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/Copy-Action.py b/test/Copy-Action.py
index ded158a7..6003aa98 100644
--- a/test/Copy-Action.py
+++ b/test/Copy-Action.py
@@ -43,9 +43,9 @@ Execute(Copy(File('d2.out'), 'd2.in'))
Execute(Copy('d3.out', File('f3.in')))
def cat(env, source, target):
target = str(target[0])
- f = open(target, "wb")
+ f = open(target, "w")
for src in source:
- f.write(open(str(src), "rb").read())
+ f.write(open(str(src), "r").read())
f.close()
Cat = Action(cat)
env = Environment()
@@ -134,20 +134,20 @@ test.must_not_exist('f 13.out')
test.run()
-test.must_match('f1.out', "f1.in\n")
-test.must_match(['d2.out', 'file'], "d2.in/file\n")
-test.must_match(['d3.out', 'f3.in'], "f3.in\n")
-test.must_match('f4.out', "f4.in\n")
-test.must_match(['d5.out', 'file'], "d5.in/file\n")
-test.must_match(['d6.out', 'f6.in'], "f6.in\n")
-test.must_match('f7.out', "f7.in\n")
-test.must_match('f8.out', "f8.in\n")
-test.must_match('f9.out', "f9.in\n")
-test.must_match('f9.out-Copy', "f9.in\n")
-test.must_match('d4/f10.in', 'f10.in\n')
-test.must_match('d4/f11.out', 'f11.in\n')
-test.must_match('d4/f12.out', 'f12.in\n')
-test.must_match('f 13.out', 'f 13.in\n')
+test.must_match('f1.out', "f1.in\n", mode='r')
+test.must_match(['d2.out', 'file'], "d2.in/file\n", mode='r')
+test.must_match(['d3.out', 'f3.in'], "f3.in\n", mode='r')
+test.must_match('f4.out', "f4.in\n", mode='r')
+test.must_match(['d5.out', 'file'], "d5.in/file\n", mode='r')
+test.must_match(['d6.out', 'f6.in'], "f6.in\n", mode='r')
+test.must_match('f7.out', "f7.in\n", mode='r')
+test.must_match('f8.out', "f8.in\n", mode='r')
+test.must_match('f9.out', "f9.in\n", mode='r')
+test.must_match('f9.out-Copy', "f9.in\n", mode='r')
+test.must_match('d4/f10.in', 'f10.in\n', mode='r')
+test.must_match('d4/f11.out', 'f11.in\n', mode='r')
+test.must_match('d4/f12.out', 'f12.in\n', mode='r')
+test.must_match('f 13.out', 'f 13.in\n', mode='r')
errors = 0