clawpack/amrclaw — pull request #69 by rjleveque (2013-09-03 18:59:17+00:00)
Title: New attempt at regression tests in tests/ and examples/

I added some quick regression tests in the amrclaw/tests/ directory.

Run them all via:
cd $CLAW/amrclaw/tests
and then
python run_tests.py
or
make tests

This runs nosetests in each subdirectory to run the tests specified in regression_tests.py. test1 checks that it compiles and runs. The remaining tests are based on a short run (< 5 seconds) with regions and gauges set to exercise the code, and the test passes if the code runs and if the sum of t values and of q values at the gauges agree with archived results for each gauge.

----------

I also made a first pass at code to compare plots produced by running examples in amrclaw/examples with versions that are in the gallery, which are archived in the clawpack/clawpack.github.com/doc/_static directory. These take longer to run.

Only one example modified so far... to test it:
cd $CLAW/amrclaw/examples/advection_2d_square
python regression_tests.py

Note: different versions of matplotlib create slightly different looking plots and so differences might be flagged due to this. The current gallery version was created with Anaconda.

Comments welcome!