2016-11-03 13:13:50 +01:00
|
|
|
using Weave
|
2018-07-23 12:37:25 +02:00
|
|
|
using Test
|
2014-12-09 14:32:41 +01:00
|
|
|
|
2016-04-11 19:34:36 +02:00
|
|
|
cleanup = true
|
|
|
|
|
2014-12-09 14:32:41 +01:00
|
|
|
weave("documents/pyplot_formats.txt", plotlib="pyplot", doctype="tex")
|
2018-07-23 12:37:25 +02:00
|
|
|
result = read("documents/pyplot_formats.tex", String)
|
|
|
|
ref = read("documents/pyplot_formats_ref.tex", String)
|
2016-04-12 16:08:29 +02:00
|
|
|
result = replace(result, r"\s*PyObject.*\n", "\n") #Remove PyObjects, because they change
|
|
|
|
ref = replace(ref, r"\s*PyObject.*\n", "\n")
|
2014-12-09 14:32:41 +01:00
|
|
|
@test result == ref
|
|
|
|
|
|
|
|
weave("documents/pyplot_formats.txt", plotlib="pyplot", doctype="github")
|
2018-07-23 12:37:25 +02:00
|
|
|
result = read("documents/pyplot_formats.md", String)
|
|
|
|
ref = read("documents/pyplot_formats_ref.md", String)
|
2014-12-09 14:32:41 +01:00
|
|
|
result = replace(result, r"\s*PyObject.*\n", "")
|
|
|
|
ref = replace(ref, r"\s*PyObject.*\n", "")
|
|
|
|
@test result == ref
|
|
|
|
|
|
|
|
|
|
|
|
weave("documents/pyplot_formats.txt", plotlib="pyplot", doctype="rst", fig_ext=".svg")
|
2018-07-23 12:37:25 +02:00
|
|
|
result = read("documents/pyplot_formats.rst", String)
|
|
|
|
ref = read("documents/pyplot_formats_ref.rst", String)
|
2014-12-09 14:32:41 +01:00
|
|
|
result = replace(result, r"\s*PyObject.*\n", "")
|
|
|
|
ref = replace(ref, r"\s*PyObject.*\n", "")
|
|
|
|
@test result == ref
|
2016-04-11 19:34:36 +02:00
|
|
|
|
|
|
|
if cleanup
|
|
|
|
rm("documents/pyplot_formats.tex")
|
|
|
|
rm("documents/pyplot_formats.rst")
|
|
|
|
rm("documents/pyplot_formats.md")
|
|
|
|
rm("documents/figures", recursive = true)
|
|
|
|
end
|