0

I've a problem unit testing Python code, which uses the (py)ROOT package. It simply aborts collecting the tests when there is a line import ROOT in one of the scripts.

Does anybody have an idea what's going on?

foo@bar ~/project/dir                                                [19:21:17] 
(project)> $ py.test -v                                             [±master ●]
============================= test session starts ==============================
platform darwin -- Python 2.7.6 -- py-1.4.25 -- pytest-2.6.3 -- /path/to/.virtualenvs/project/bin/python
collecting 0 items[1]    16520 abort      py.test -v
tamasgal
  • 24,826
  • 18
  • 96
  • 135

1 Answers1

0

I had a similar issue by adding the PyROOT bindings to export $PYTHONPATH in my .bashrc. The locally set PYTHONPATH was ignored. A solution is copying or linking the ROOT.py and libPyROOT.so files to the appropriate Python directory in /usr/lib. More details in this answer: https://stackoverflow.com/a/33130000/4753851

Community
  • 1
  • 1
Sascha
  • 86
  • 1
  • 4