compute-tooling / compute-studio

A Utility for Sharing Computational Models
https://compute.studio
Other
15 stars 5 forks source link

Pytest exits successfully if there's a failed import #485

Closed hdoupe closed 3 years ago

hdoupe commented 3 years ago
============================= test session starts ==============================
platform linux -- Python 3.6.13, pytest-6.2.5, py-1.10.0, pluggy-1.0.0 -- /opt/conda/bin/python
cachedir: .pytest_cache
rootdir: /home/Tax-Cruncher/cs-config
collecting ... collected 0 items / 1 error

==================================== ERRORS ====================================
______________ ERROR collecting cs_config/tests/test_functions.py ______________
ImportError while importing test module '/home/Tax-Cruncher/cs-config/cs_config/tests/test_functions.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/conda/lib/python3.6/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
cs-config/cs_config/__init__.py:1: in <module>
from .functions import *
cs-config/cs_config/functions.py:7: in <module>
from .outputs import credit_plot, rate_plot, liability_plot
cs-config/cs_config/outputs.py:1: in <module>
from bokeh.embed import json_item
E   ImportError: cannot import name 'json_item'
=============================== warnings summary ===============================
../../opt/conda/lib/python3.6/site-packages/marshmallow/fields.py:184
../../opt/conda/lib/python3.6/site-packages/marshmallow/fields.py:184
../../opt/conda/lib/python3.6/site-packages/marshmallow/fields.py:184
../../opt/conda/lib/python3.6/site-packages/marshmallow/fields.py:184
../../opt/conda/lib/python3.6/site-packages/marshmallow/fields.py:184
../../opt/conda/lib/python3.6/site-packages/marshmallow/fields.py:184
../../opt/conda/lib/python3.6/site-packages/marshmallow/fields.py:184
/opt/conda/lib/python3.6/site-packages/marshmallow/fields.py:184: RemovedInMarshmallow4Warning: The 'missing' argument to fields is deprecated. Use 'load_default' instead.
RemovedInMarshmallow4Warning,

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
ERROR cs-config/cs_config/tests/test_functions.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
========================= 7 warnings, 1 error in 0.68s =========================
hdoupe commented 3 years ago

This was resolved by #486