Switch to the same test system that dolfin-adjoint uses.

Test can be executed with:
python test.py
or in parallel on 4 cores:
python test.py -n 4