summaryrefslogtreecommitdiffstats
path: root/test/TEX
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-03-20 00:12:04 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2017-03-20 00:12:04 (GMT)
commit1e6772f1cdcd97e51b59f7d7702dd7476e28c3d9 (patch)
tree4f849d7ecff872a415e449a778f593e147dd5f0c /test/TEX
parent2ef8bb1c87905a5ce0c685d99a00a6741350f1fe (diff)
downloadSCons-1e6772f1cdcd97e51b59f7d7702dd7476e28c3d9.zip
SCons-1e6772f1cdcd97e51b59f7d7702dd7476e28c3d9.tar.gz
SCons-1e6772f1cdcd97e51b59f7d7702dd7476e28c3d9.tar.bz2
py2/3 fix wb/rb
Diffstat (limited to 'test/TEX')
-rw-r--r--test/TEX/LATEX.py8
-rw-r--r--test/TEX/PDFLATEXFLAGS.py6
-rw-r--r--test/TEX/TEX.py8
-rw-r--r--test/TEX/TEXFLAGS.py6
-rw-r--r--test/TEX/multi-run.py8
5 files changed, 18 insertions, 18 deletions
diff --git a/test/TEX/LATEX.py b/test/TEX/LATEX.py
index c6f58e6..362bb62 100644
--- a/test/TEX/LATEX.py
+++ b/test/TEX/LATEX.py
@@ -44,10 +44,10 @@ import os
import getopt
cmd_opts, arg = getopt.getopt(sys.argv[1:], 'i:r:', [])
base_name = os.path.splitext(arg[0])[0]
-infile = open(arg[0], 'rb')
-dvi_file = open(base_name+'.dvi', 'wb')
-aux_file = open(base_name+'.aux', 'wb')
-log_file = open(base_name+'.log', 'wb')
+infile = open(arg[0], 'r')
+dvi_file = open(base_name+'.dvi', 'w')
+aux_file = open(base_name+'.aux', 'w')
+log_file = open(base_name+'.log', 'w')
for l in infile.readlines():
if l[0] != '\\':
dvi_file.write(l)
diff --git a/test/TEX/PDFLATEXFLAGS.py b/test/TEX/PDFLATEXFLAGS.py
index ffed20b..47643e4 100644
--- a/test/TEX/PDFLATEXFLAGS.py
+++ b/test/TEX/PDFLATEXFLAGS.py
@@ -43,8 +43,8 @@ opt_string = ''
for opt, arg in cmd_opts:
opt_string = opt_string + ' ' + opt
base_name = os.path.splitext(args[0])[0]
-infile = open(args[0], 'rb')
-out_file = open(base_name+'.pdf', 'wb')
+infile = open(args[0], 'r')
+out_file = open(base_name+'.pdf', 'w')
out_file.write(opt_string + "\n")
for l in infile.readlines():
if l[0] != '\\':
@@ -111,7 +111,7 @@ This is the %s LaTeX file.
test.run(arguments = 'bar.pdf', stderr = None)
- test.fail_test(test.read('wrapper.out') != "wrapper.py\n")
+ test.must_match('wrapper.out',"wrapper.py\n", mode='r')
test.fail_test(not os.path.exists(test.workpath('bar.pdf')))
diff --git a/test/TEX/TEX.py b/test/TEX/TEX.py
index 3e48419..7b20106 100644
--- a/test/TEX/TEX.py
+++ b/test/TEX/TEX.py
@@ -47,10 +47,10 @@ import os
import getopt
cmd_opts, arg = getopt.getopt(sys.argv[1:], 'i:r:', [])
base_name = os.path.splitext(arg[0])[0]
-infile = open(arg[0], 'rb')
-dvi_file = open(base_name+'.dvi', 'wb')
-aux_file = open(base_name+'.aux', 'wb')
-log_file = open(base_name+'.log', 'wb')
+infile = open(arg[0], 'r')
+dvi_file = open(base_name+'.dvi', 'w')
+aux_file = open(base_name+'.aux', 'w')
+log_file = open(base_name+'.log', 'w')
for l in infile.readlines():
if l[0] != '\\':
dvi_file.write(l)
diff --git a/test/TEX/TEXFLAGS.py b/test/TEX/TEXFLAGS.py
index e21aaa9..4b632f7 100644
--- a/test/TEX/TEXFLAGS.py
+++ b/test/TEX/TEXFLAGS.py
@@ -43,8 +43,8 @@ opt_string = ''
for opt, arg in cmd_opts:
opt_string = opt_string + ' ' + opt
base_name = os.path.splitext(args[0])[0]
-infile = open(args[0], 'rb')
-out_file = open(base_name+'.dvi', 'wb')
+infile = open(args[0], 'r')
+out_file = open(base_name+'.dvi', 'w')
out_file.write(opt_string + "\n")
for l in infile.readlines():
if l[0] != '\\':
@@ -65,7 +65,7 @@ test.write('test.tex', r"""This is a test.
test.run(arguments = 'test.dvi', stderr = None)
-test.fail_test(test.read('test.dvi') != " -x\nThis is a test.\n")
+test.must_match('test.dvi'," -x\nThis is a test.\n")
diff --git a/test/TEX/multi-run.py b/test/TEX/multi-run.py
index 37a839b..ff4e82a 100644
--- a/test/TEX/multi-run.py
+++ b/test/TEX/multi-run.py
@@ -149,7 +149,7 @@ env.PDF( "foo.tex" )
test.must_exist(['work1', 'foo.bbl'])
- foo_log = test.read(['work1', 'foo.log'])
+ foo_log = test.read(['work1', 'foo.log'], mode='r')
test.must_not_contain_any_line(foo_log, ['undefined references'], 'foo.log')
test.write(['work3', 'SConstruct'], """\
@@ -163,7 +163,7 @@ env.DVI( "foo3.tex" )
test.run(chdir = 'work3', arguments = '.')
- foo_log = test.read(['work3', 'foo3.log'])
+ foo_log = test.read(['work3', 'foo3.log'], mode='r')
test.must_not_contain_any_line(foo_log, ['Rerun LaTeX'], 'foo3.log')
@@ -185,7 +185,7 @@ env.PDF( "foo.ltx" )
test.must_exist(['work2', 'foo.bbl'])
- foo_log = test.read(['work2', 'foo.log'])
+ foo_log = test.read(['work2', 'foo.log'], mode='r')
test.must_not_contain_any_line(foo_log, ['undefined references'], 'foo.log')
test.write(['work3', 'SConstruct'], """\
@@ -200,7 +200,7 @@ env.PDF( "foo3.tex" )
test.run(chdir = 'work3', arguments = '.')
- foo_log = test.read(['work3', 'foo3.log'])
+ foo_log = test.read(['work3', 'foo3.log'], mode='r')
test.must_not_contain_any_line(foo_log, ['Rerun LaTeX'], 'foo3.log')