clawpack/pyclaw — Issue #146: Create Python Only Tests
Author: mandli
Created: 2012-02-26 20:54:10+00:00
State: open
Labels: tests

Currently there are no tests that only utilize the python based code. Some of the tests have also not been updated to work with the new dynamic Riemann solvers (wrong name in some cases). For instance, running the current nosetests without compiling the Riemann package gives the following error:

```
======================================================================
ERROR: test_examples.test_1D_acoustics_1i('./src/pyclaw/sharpclaw', 'sharpclaw1.so', './test/acoustics/1d/homogeneous', 'acoustics', 'acoustics', at 0x108ae1230>, {'use_petsc': True, 'kernel_language': 'Fortran', 'solver_type': 'sharpclaw'})
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/mandli/src/clawpack/pyclaw/test/util.py", line 17, in build_run_verify
verify_it(run_method, method_name, module_name, verifier, options, module_path)
File "/Users/mandli/src/clawpack/pyclaw/test/util.py", line 56, in verify_it
output = run_method(**options)
File "./test/acoustics/1d/homogeneous/acoustics.py", line 24, in acoustics
solver.rp = riemann.rp1_acoustics
AttributeError: 'module' object has no attribute 'rp1_acoustics'
```

A quick fix would be to incorporate changes from the the apps directory into the tests (which use the correct names if being used for python).