summaryrefslogtreecommitdiff
path: root/tests/test_pretty_print.py
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2013-03-09 15:58:54 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2013-03-09 15:58:54 (GMT)
commita7ee238a51fbf0dc6b24b2cbfec0a3f82407175c (patch)
treeb987b8dd12b324ba51696d4897b7c04d66b7d419 /tests/test_pretty_print.py
parent74432b32069c99d056f0be1eaf9bd07eb67edba1 (diff)
clarify error message when no image is generated
Diffstat (limited to 'tests/test_pretty_print.py')
-rwxr-xr-xtests/test_pretty_print.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_pretty_print.py b/tests/test_pretty_print.py
index 8c13c62..3f4f1c9 100755
--- a/tests/test_pretty_print.py
+++ b/tests/test_pretty_print.py
@@ -319,10 +319,14 @@ def png_encode64( fname, width=250 ):
data = ''
data_uri = data.encode("base64").replace("\n","")
tag = '<img'
+ tag += ' style="border:1px solid gray"'
tag += ' src="data:image/png;base64,'
tag += data_uri + '"'
tag += ' width="'+str(width)+'"'
- tag += ' alt="openscad_test_image"'
+ if data =='':
+ tag += ' alt="error: no image generated"'
+ else:
+ tag += ' alt="openscad_test_image"'
tag += ' />\n'
return tag
contact: Jan Huwald // Impressum