简体   繁体   中英

NoseTest unable find module

I'm unable to run nosetests on my tests, because of module import errors.

I am running inside of a virtualenv with global site packages enabled.

I can successfuly run the tests from the IDE (pycharm). I can also import the module directly from cli. I can also (not shown) run a python script tht imports the troublesome module.

I assume this is a path issue, but haven't been able to discover the root cause. I have also toggled no-path-adjustsment in .noserc to no avail.

(ipc)➜  Analytics git:(feature/ipc_via_rest) pip freeze | grep arrow
arrow==0.7.0

(ipc)➜  Analytics git:(feature/ipc_via_rest) python 
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import arrow
>>> arrow.utcnow()
<Arrow [2015-11-30T16:29:57.363278+00:00]>
>>> exit()

(ipc)➜  Analytics git:(feature/ipc_via_rest) nosetests  src/bnr_analytics_data_services/                                    
 <elided>
ImportError: No module named arrow

Try running nosetest --pdb . It will bring up pdb debugger on error. Look at sys.path for abnormalities.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM