Skip to content

Commit 88a77d5

Browse files
committed
update make_exports script to use MathJax v4
1 parent 83bb307 commit 88a77d5

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

test/image/make_exports.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
dirOut = os.path.join(root, "build", "test_images")
99

1010
pio.templates.default = "none"
11-
pio.kaleido.scope.plotlyjs = os.path.join(root, "build", "plotly.js")
11+
pio.defaults.plotlyjs = os.path.join(root, "build", "plotly.js")
12+
pio.defaults.mathjax = "https://cdn.jsdelivr.net/npm/mathjax@4.1.2/tex-svg.js"
1213

1314
allFormats = ["svg", "jpg", "jpeg", "webp", "pdf"]
1415
# 'png' is tested by image-test
@@ -31,7 +32,7 @@
3132
"zsmooth_methods",
3233
]
3334

34-
failed = 0
35+
failed = []
3536
for name in allNames:
3637
for fmt in allFormats:
3738
print(name + " --> " + fmt)
@@ -59,8 +60,15 @@
5960
)
6061

6162
except Exception as e:
63+
import traceback
6264
print(e)
63-
failed += 1
65+
traceback.print_exc()
6466

65-
if failed > 0:
67+
failed.append((name, fmt))
68+
69+
if len(failed) > 0:
70+
print("\nFailed on:")
71+
for name, fmt in failed:
72+
print(f" {name} ({fmt})")
73+
print("")
6674
sys.exit(1)

0 commit comments

Comments
 (0)