From 74432b32069c99d056f0be1eaf9bd07eb67edba1 Mon Sep 17 00:00:00 2001 From: don bright Date: Sat, 9 Mar 2013 09:42:53 -0600 Subject: fix for when running under wine. also fix test_pretty_print bug diff --git a/tests/test_cmdline_tool.py b/tests/test_cmdline_tool.py index a0dd14c..81a7795 100755 --- a/tests/test_cmdline_tool.py +++ b/tests/test_cmdline_tool.py @@ -150,6 +150,8 @@ def run_test(testname, cmd, args): try: if os.path.isfile(cmd+'.exe') and options.mingw_cross_env: cmdline = ['wine']+[cmd+'.exe'] + args + [outputname] + elif cmd[-4:].lower() == '.exe' and options.mingw_cross_env: + cmdline = ['wine']+[cmd] + args + [outputname] else: cmdline = [cmd] + args + [outputname] proc = subprocess.Popen(cmdline, stdout=subprocess.PIPE, stderr=subprocess.PIPE) diff --git a/tests/test_pretty_print.py b/tests/test_pretty_print.py index 54b0f92..8c13c62 100755 --- a/tests/test_pretty_print.py +++ b/tests/test_pretty_print.py @@ -312,8 +312,11 @@ TESTLOG def png_encode64( fname, width=250 ): # en.wikipedia.org/wiki/Data_URI_scheme - f = open( fname, "rb" ) - data = f.read() + try: + f = open( fname, "rb" ) + data = f.read() + except: + data = '' data_uri = data.encode("base64").replace("\n","") tag = '