summaryrefslogtreecommitdiff
path: root/test/TEX
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-03-19 16:48:24 -0700
committerWilliam Deegan <bill@baddogconsulting.com>2017-03-19 16:48:24 -0700
commitb1900890e7811d8873b1b33f1599cfc7b832a8af (patch)
treedd90ec7f550fba0798160ef7ecbde6feb32fdcb9 /test/TEX
parent3920bdd38d35fb43751f0321189b0468ff7b2905 (diff)
downloadscons-b1900890e7811d8873b1b33f1599cfc7b832a8af.tar.gz
py2/3 fix rb/wb also replace convoluted test logic with correct test methods to check for file exist/not exist
Diffstat (limited to 'test/TEX')
-rw-r--r--test/TEX/PDFTEXFLAGS.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/TEX/PDFTEXFLAGS.py b/test/TEX/PDFTEXFLAGS.py
index 06dc780b..97b352eb 100644
--- a/test/TEX/PDFTEXFLAGS.py
+++ b/test/TEX/PDFTEXFLAGS.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] != '\\':
@@ -96,15 +96,15 @@ This is the %s TeX file.
test.run(arguments = 'foo.pdf', stderr = None)
- test.fail_test(os.path.exists(test.workpath('wrapper.out')))
+ test.must_not_exist(test.workpath('wrapper.out'))
- test.fail_test(not os.path.exists(test.workpath('foo.pdf')))
+ test.must_exist(test.workpath('foo.pdf'))
test.run(arguments = 'bar.pdf', stderr = None)
- test.fail_test(not os.path.exists(test.workpath('wrapper.out')))
+ test.must_exist(test.workpath('wrapper.out'))
- test.fail_test(not os.path.exists(test.workpath('bar.pdf')))
+ test.must_exist(test.workpath('bar.pdf'))
test.pass_test()