diff options
author | don bright <hugh.m.bright@gmail.com> | 2013-03-09 15:42:53 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2013-03-09 15:42:53 (GMT) |
commit | 74432b32069c99d056f0be1eaf9bd07eb67edba1 (patch) | |
tree | c0b7f505fa582d613cf2f86cc4f690b261db3953 | |
parent | 2ab5a0cc9bae5c66b9050ba0d1e2f2f563091d17 (diff) |
fix for when running under wine. also fix test_pretty_print bug
-rwxr-xr-x | tests/test_cmdline_tool.py | 2 | ||||
-rwxr-xr-x | tests/test_pretty_print.py | 7 |
2 files changed, 7 insertions, 2 deletions
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 = '<img' tag += ' src="data:image/png;base64,' |