incf-nidash / PyNIDM

Other
21 stars 31 forks source link

Magic missing in test setup? #56

Open mih opened 6 years ago

mih commented 6 years ago

I installed PyNIDM following the instructions on the frontpage. But I cannot run the tests:

% pytest-3
========================================================================== test session starts ==========================================================================
platform linux -- Python 3.6.3, pytest-3.2.1, py-1.4.34, pluggy-0.4.0
rootdir: /home/mih/hacking/PyNIDM, inifile:
plugins: xonsh-0.5.12
collected 0 items / 2 errors                                                                                                                                             

================================================================================ ERRORS =================================================================================
_______________________________________________________ ERROR collecting nidm/experiment/tests/test_experiment.py _______________________________________________________
ImportError while importing test module '/home/mih/hacking/PyNIDM/nidm/experiment/tests/test_experiment.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
nidm/experiment/__init__.py:1: in <module>
    from .Core import Core
nidm/experiment/Core.py:4: in <module>
    from rdflib import Namespace
E   ModuleNotFoundError: No module named 'rdflib'
____________________________________________________ ERROR collecting nidm/experiment/tests/test_experiment_basic.py ____________________________________________________
ImportError while importing test module '/home/mih/hacking/PyNIDM/nidm/experiment/tests/test_experiment_basic.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
nidm/experiment/__init__.py:1: in <module>
    from .Core import Core
nidm/experiment/Core.py:4: in <module>
    from rdflib import Namespace
E   ModuleNotFoundError: No module named 'rdflib'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================================================== 2 error in 0.14 seconds ========================================================================

failure is not pytest-specific, nosetests has the same issue. But

% python --version
Python 3.6.3

% python -c "from rdflib import Namespace; print('happy')"
INFO:rdflib:RDFLib Version: 4.2.2
happy

% python -c "import nidm.experiment; print ('happy')"
INFO:rdflib:RDFLib Version: 4.2.2
happy

So the general installation seems to be working, but I am missing something to be able to run the tests.

dbkeator commented 6 years ago

@djarecka, can you help with this?

djarecka commented 6 years ago

hmm, it works on my OSX, can try to reproduce on Linux