ImageMetaTag - test.pyΒΆ

The test.py script includes tests for the main functionality of ImageMetaTag. It also acts as a demonstration of the code in action on a set of very simple example plots of random data.

Running the command:

python test.py
will create a set of plots of random data, create a number of ImageMetaTag.ImageDict objects describing how image metadata should be presented, and write these to webpages to browse them. The images and webpages are created in a directory::

${HOME}/public_html/ImageMetaTagTest

The test.py script is not a part of the ImageMetaTag module, it is written to import the module and use it instead.

The webpages it produces can be viewed here:

The test.py script can be run without re-plotting the random data by:

python test.py --skip-plotting

As a scalability test, once the images have been produced and wepages created, the test.py script also creates a moderately large ImageMetaTag.ImageDict with 9 factorial (9! = 362880) members. This process only mimics the metadata, it does not actually create the plots! It results in a web page which is deliberately empty: http://gws-access.ceda.ac.uk/public/mo_forecasts/test/ImageMetaTagTest/biggus_pageus.html

This test can be skipped by running the test as:

python test.py --no-big-dict