mock requirement for python tests
Running make check
in a from-source install after the recent addition of automated python tests, with Python 2.7.13 on Debian9, failed for me due to missing "mock" package. (details below) Doing pip install mock
fixed it. (Well, made it continue until a different error, which I'll post next...)
@duncanmmacleod @adam-mercer I'm not quite sure if/how python dependencies are supposed to be tracked, and whether it's different for test dependencies than for actual code running. Should this e.g. be checked at configure time?
Note that on pypi I found:
mock is now part of the Python standard library, available as unittest.mock in Python 3.3 onwards.
so if you want to treat this as a transient problem that goes away anyway once py3 migration is complete, I'm fine with that.
Error log:
make[6]: Entering directory '/home/dkeitel/git/lvc/lalsuite/lal/test/python'
make[7]: Entering directory '/home/dkeitel/git/lvc/lalsuite/lal/test/python'
FAIL: test_python_scripts.py
FAIL: test_python_imports.py
PASS: test_antenna.py
FAIL: test_gpstime.py
PASS: test_rate.py
PASS: utils_cache_verify.py
============================================================================
Testsuite summary for LAL 6.20.2.1
============================================================================
# TOTAL: 6
# PASS: 3
# SKIP: 0
# XFAIL: 0
# FAIL: 3
# XPASS: 0
# ERROR: 0
============================================================================
See test/python/test-suite.log
Please report to lal-discuss@ligo.org
from lal/test/python/test-suite.log:
command: /bin/bash /home/dkeitel/git/lvc/lalsuite/lal/libtool --mode=execute -dlopen /home/dkeitel/git/lvc/lalsuite/lal/src/liblal.la -dlopen /home/dkeitel/git/lvc/lalsuite/lal/src/support/liblalsupport.la /usr/bin/python '-u' './test_python_scripts.py'
---------- ../../gnuscripts/lalsuite_run_uninstalled ----------
Traceback (most recent call last):
File "./test_python_scripts.py", line 17, in <module>
import mock
ImportError: No module named mock
FAIL test_python_scripts.py (exit status: 1)
FAIL: test_python_imports
=========================