# Distributed under the terms of the Modified BSD License.
"""
test_packages
~~~~~~~~~~~~~~~
This test module tests if R and Python packages installed can be imported.
It's a basic test aiming to prove that the package is working properly.
The goal is to detect import errors that can be caused by incompatibilities between packages for example:
- #1012: issue importing `sympy`
- #966: isssue importing `pyarrow`
This module checks dynmamically, through the `CondaPackageHelper`, only the specified packages i.e. packages requested by `conda install` in the `Dockerfiles`.
This means that it does not check dependencies. This choice is a tradeoff to cover the main requirements while achieving reasonable test duration.
However it could be easily changed (or completed) to cover also dependencies `package_helper.installed_packages()` instead of `package_helper.specified_packages()`.
Example:
$ make test/datascience-notebook
# [...]
# test/test_packages.py::test_python_packages
# --------------------------------------------------------------------------------------------- live log setup ----------------------------------------------------------------------------------------------