underworldcode/stripy

[REVIEW] python tests are broken / unhelpful

lmoresi opened this issue · 2 comments

This issue was raised by @rrenka as an installation query and I am moving it here for the formal review process:

I get various errors from the tests:


fib_test.py:  ImportError: No module named stripack

mpas_mesh_test.py:  ImportError: No module named netCDF4

test_Triangulation.py:  TypeError: ev() got an unexpected keyword argument 'dx'

test_sTriangulation.py:  AttributeError: 'sTriangulation' object has no attribute 'gradient'

x1.2562.grid.nc:  SyntaxError: Non-ASCII character '\xa9' in file x1.2562.grid.nc on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details


Apologies for these error messages, the test scripts have not been updated in some time. This is because all of the components that were tested have been incorporated in the Jupyter notebooks. Regardless, I have removed some redundant tests and fixed test_routines.py, test_Triangulation.py, and test_sTriangulation.py in f158557 commit on the master branch.

The latest docker image with the updated tests can be retrieved using the following command,

docker pull underworldcode/stripy:latest

Thanks @rrenka for bringing this to our attention.

I added a rather inelegant test file for valid importing of various dependencies culled from notebooks etc. The output might be helpful in dealing with the issues above.