summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-03-19 22:00:55 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2017-03-19 22:00:55 (GMT)
commita5f1139677eaeeac837ad5dd432664b2526b1ff0 (patch)
tree56a878425263932a98f22bff63ae67a4ba39e941
parentf520c8213cc50c6074dced70b7c061e6aabdd11f (diff)
parent81ced582305f177bb43f9f9474100cb0688d51ca (diff)
downloadSCons-a5f1139677eaeeac837ad5dd432664b2526b1ff0.zip
SCons-a5f1139677eaeeac837ad5dd432664b2526b1ff0.tar.gz
SCons-a5f1139677eaeeac837ad5dd432664b2526b1ff0.tar.bz2
merge
-rw-r--r--test/explain/alias-order.py2
-rw-r--r--test/explain/basic.py6
-rw-r--r--test/explain/save-info.py6
-rw-r--r--test/gettext/POInit/UserExamples.py28
-rw-r--r--test/gettext/POTUpdate/UserExamples.py4
5 files changed, 23 insertions, 23 deletions
diff --git a/test/explain/alias-order.py b/test/explain/alias-order.py
index 3eed275..611c512 100644
--- a/test/explain/alias-order.py
+++ b/test/explain/alias-order.py
@@ -41,7 +41,7 @@ test.write(['src', 'SConstruct'],"""
env = Environment()
def action( source, target, env ):
- f = open( str(target[0]), 'w' )
+ f = open( str(target[0]), 'wb' )
f.write( source[0].get_contents())
f.close()
diff --git a/test/explain/basic.py b/test/explain/basic.py
index 7079e44..fb331fe 100644
--- a/test/explain/basic.py
+++ b/test/explain/basic.py
@@ -62,7 +62,7 @@ def process(outfp, infp):
if line[:8] == 'include ':
file = line[8:-1]
try:
- fp = open(file, 'rb')
+ fp = open(file, 'r')
except IOError:
import os
print("os.getcwd() =", os.getcwd())
@@ -71,10 +71,10 @@ def process(outfp, infp):
else:
outfp.write(line)
-outfp = open(sys.argv[1], 'wb')
+outfp = open(sys.argv[1], 'w')
for f in sys.argv[2:]:
if f != '-':
- process(outfp, open(f, 'rb'))
+ process(outfp, open(f, 'r'))
sys.exit(0)
""")
diff --git a/test/explain/save-info.py b/test/explain/save-info.py
index 545f624..150d7ef 100644
--- a/test/explain/save-info.py
+++ b/test/explain/save-info.py
@@ -51,7 +51,7 @@ def process(outfp, infp):
if line[:8] == 'include ':
file = line[8:-1]
try:
- fp = open(file, 'rb')
+ fp = open(file, 'r')
except IOError:
import os
print("os.getcwd() =", os.getcwd())
@@ -60,10 +60,10 @@ def process(outfp, infp):
else:
outfp.write(line)
-outfp = open(sys.argv[1], 'wb')
+outfp = open(sys.argv[1], 'w')
for f in sys.argv[2:]:
if f != '-':
- process(outfp, open(f, 'rb'))
+ process(outfp, open(f, 'r'))
sys.exit(0)
""")
diff --git a/test/gettext/POInit/UserExamples.py b/test/gettext/POInit/UserExamples.py
index a498a53..a701851 100644
--- a/test/gettext/POInit/UserExamples.py
+++ b/test/gettext/POInit/UserExamples.py
@@ -79,8 +79,8 @@ test.write(['ex1', 'messages.pot'], pot_contents)
test.run(arguments = 'po-create', chdir = 'ex1', stderr = None)
test.must_exist( ['ex1', 'en.po'] )
test.must_exist( ['ex1', 'pl.po'] )
-test.must_contain( ['ex1', 'en.po'], "Hello from a.cpp")
-test.must_contain( ['ex1', 'pl.po'], "Hello from a.cpp")
+test.must_contain( ['ex1', 'en.po'], "Hello from a.cpp", mode='r')
+test.must_contain( ['ex1', 'pl.po'], "Hello from a.cpp", mode='r')
###############################################################################
@@ -102,8 +102,8 @@ test.write(['ex2', 'foo.pot'], pot_contents)
test.run(arguments = 'po-create', chdir = 'ex2', stderr = None)
test.must_exist( ['ex2', 'en.po'] )
test.must_exist( ['ex2', 'pl.po'] )
-test.must_contain( ['ex2', 'en.po'], "Hello from a.cpp" )
-test.must_contain( ['ex2', 'pl.po'], "Hello from a.cpp" )
+test.must_contain( ['ex2', 'en.po'], "Hello from a.cpp", mode='r' )
+test.must_contain( ['ex2', 'pl.po'], "Hello from a.cpp", mode='r' )
###############################################################################
# POInit: Example 3
@@ -124,8 +124,8 @@ test.write(['ex3', 'foo.pot'], pot_contents)
test.run(arguments = 'po-create', chdir = 'ex3', stderr = None)
test.must_exist( ['ex3', 'en.po'] )
test.must_exist( ['ex3', 'pl.po'] )
-test.must_contain( ['ex3', 'en.po'], "Hello from a.cpp")
-test.must_contain( ['ex3', 'pl.po'], "Hello from a.cpp")
+test.must_contain( ['ex3', 'en.po'], "Hello from a.cpp", mode='r')
+test.must_contain( ['ex3', 'pl.po'], "Hello from a.cpp", mode='r')
###############################################################################
# POInit: Example 4
@@ -150,8 +150,8 @@ test.write(['ex4', 'messages.pot'], pot_contents)
test.run(arguments = 'po-create', chdir = 'ex4', stderr = None)
test.must_exist( ['ex4', 'en.po'] )
test.must_exist( ['ex4', 'pl.po'] )
-test.must_contain( ['ex4', 'en.po'], "Hello from a.cpp")
-test.must_contain( ['ex4', 'pl.po'], "Hello from a.cpp")
+test.must_contain( ['ex4', 'en.po'], "Hello from a.cpp", mode='r')
+test.must_contain( ['ex4', 'pl.po'], "Hello from a.cpp", mode='r')
###############################################################################
# POInit: Example 5
@@ -178,10 +178,10 @@ test.must_exist( ['ex5', 'en.po'] )
test.must_exist( ['ex5', 'pl.po'] )
test.must_exist( ['ex5', 'de.po'] )
test.must_exist( ['ex5', 'fr.po'] )
-test.must_contain( ['ex5', 'en.po'], "Hello from a.cpp")
-test.must_contain( ['ex5', 'pl.po'], "Hello from a.cpp")
-test.must_contain( ['ex5', 'de.po'], "Hello from a.cpp")
-test.must_contain( ['ex5', 'fr.po'], "Hello from a.cpp")
+test.must_contain( ['ex5', 'en.po'], "Hello from a.cpp", mode='r')
+test.must_contain( ['ex5', 'pl.po'], "Hello from a.cpp", mode='r')
+test.must_contain( ['ex5', 'de.po'], "Hello from a.cpp", mode='r')
+test.must_contain( ['ex5', 'fr.po'], "Hello from a.cpp", mode='r')
###############################################################################
# POInit: Example 6
@@ -208,8 +208,8 @@ test.write(['ex6', 'foo.pot'], pot_contents)
test.run(arguments = 'po-create', chdir = 'ex6', stderr = None)
test.must_exist( ['ex6', 'en.po'] )
test.must_exist( ['ex6', 'pl.po'] )
-test.must_contain( ['ex6', 'en.po'], "Hello from a.cpp")
-test.must_contain( ['ex6', 'pl.po'], "Hello from a.cpp")
+test.must_contain( ['ex6', 'en.po'], "Hello from a.cpp", mode='r')
+test.must_contain( ['ex6', 'pl.po'], "Hello from a.cpp", mode='r')
test.pass_test()
diff --git a/test/gettext/POTUpdate/UserExamples.py b/test/gettext/POTUpdate/UserExamples.py
index 3c1f298..6269081 100644
--- a/test/gettext/POTUpdate/UserExamples.py
+++ b/test/gettext/POTUpdate/UserExamples.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+2#!/usr/bin/env python
#
# __COPYRIGHT__
#
@@ -25,7 +25,7 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
"""
-End-to-end tests for POTUpdate. Assure, taht the examples from user's
+End-to-end tests for POTUpdate. Assure, that the examples from user's
documentation all work.
"""