MathML torture tests

2 views
Skip to first unread message

Michael Droettboom

unread,
Aug 5, 2009, 12:33:31 PM8/5/09
to matht...@googlegroups.com
I stumbled across the MathML torture tests today:

http://www.mozilla.org/projects/mathml/demo/texvsmml.xhtml

I thought these would make some nice additions to our unit tests, so I went ahead and added them (see attached patch).  This patch also adds testing for the stixsans fonts.

They show that for the stuff we support, for the most part it is supported quite well.  However, there are a few bugs illustrated by these.  I'll go ahead and file some (low priority) bugs in the tracker for things I find.

As an aside, I did find in adding these tests that I wanted to be able to run all tests even if some of them hard-fail.  It also would be handy to run a single test manually.  Building the tests off of something like nose would probably give us all that functionality for free.

Cheers,
Mike

--
Michael Droettboom
http://www.droettboom.com/

Sent from my MacBook Wheel

This message is confidential, intended only for the named recipient(s) and may contain information that is privileged or exempt from disclosure under applicable law. If you are not the intended recipient(s), you are notified that any dissemination, distribution, or copying of this message is strictly prohibited.
mathml_torture_tests.diff

Freddie Witherden

unread,
Aug 5, 2009, 1:05:09 PM8/5/09
to matht...@googlegroups.com
Hi,

On 5 Aug 2009, at 17:33, Michael Droettboom wrote:
> As an aside, I did find in adding these tests that I wanted to be
> able to run all tests even if some of them hard-fail. It also would
> be handy to run a single test manually. Building the tests off of
> something like nose would probably give us all that functionality
> for free.

I hadn't considered what to do if one of the tests raises an
exception. Almost certainly worth encasing it in an try/except block.
A single test can be run by using the -t argument. E.g., -t func will
run the 'func' test. Tests can be comma separated: -t func,sqrt will
run the func and sqrt tests. The -T parameter does the same, but
allows selection of specific runs (fontsets/sizes/dpis).

The -L and -l arguments can be used to list available tests.

Further, I am considering including the generated .png files in the
subversion repository. The complete set weights in at around 800kb,
which is tiny nowadays. This would make it easier for people to
perform visual comparisons and also allow for true fuzzy comparisons
of images. (Currently, only the glyph and rect lists can be fuzzy
compared.)

As an aside: 0.2 RC 1 should be released later today, with the main
improvements over 0.1 being caching and bug fixes.

Regards, Freddie.

Michael Droettboom

unread,
Aug 5, 2009, 1:16:34 PM8/5/09
to matht...@googlegroups.com
On Wed, Aug 5, 2009 at 1:05 PM, Freddie Witherden <fre...@witherden.org> wrote:

As an aside: 0.2 RC 1 should be released later today, with the main
improvements over 0.1 being caching and bug fixes.


Thanks for implementing caching.  The performance (particularly on log plots) seems much better now.

Note, however, that it's probably not a good idea to have the cache be an unbounded dictionary.  A lot of matplotlib users generate plots as part of long-running processes, and in that environment memory consumption (if the cache is missing all the time) could grow unbounded.  The original mathtext caching implementation used a maxdict (a dictionary with a maximum number of elements) for this reason.
Reply all
Reply to author
Forward
0 new messages