diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-03-19 17:12:04 -0700 |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-03-19 17:12:04 -0700 |
commit | 4437fe0036e46e1d46a19e2553ce8eea9f0b358d (patch) | |
tree | 4f849d7ecff872a415e449a778f593e147dd5f0c /test/TEX | |
parent | b1900890e7811d8873b1b33f1599cfc7b832a8af (diff) | |
download | scons-4437fe0036e46e1d46a19e2553ce8eea9f0b358d.tar.gz |
py2/3 fix wb/rb
Diffstat (limited to 'test/TEX')
-rw-r--r-- | test/TEX/LATEX.py | 8 | ||||
-rw-r--r-- | test/TEX/PDFLATEXFLAGS.py | 6 | ||||
-rw-r--r-- | test/TEX/TEX.py | 8 | ||||
-rw-r--r-- | test/TEX/TEXFLAGS.py | 6 | ||||
-rw-r--r-- | test/TEX/multi-run.py | 8 |
5 files changed, 18 insertions, 18 deletions
diff --git a/test/TEX/LATEX.py b/test/TEX/LATEX.py index c6f58e62..362bb626 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 ffed20b1..47643e41 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 3e484192..7b201062 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 e21aaa90..4b632f73 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 37a839bf..ff4e82ad 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') |