PyCharm test gives: "ImportError: No module named nosetests"
Versions are PyCharm 2.7, nosetests is script.py version 1.2.1 and Python 2.6.8, via Python (x, y) -2.7.3.0. And Win7.
I can nosetest from the command line is fine. But when I create a PyCharm nosetests config and try to run or debug it, I get this:
C:\Python27\python.exe "C:\Program Files (x86)\JetBrains\PyCharm 2.7\helpers\pycharm\noserunner.py" nosetests
Testing started at 4:59 PM ...
Error
Traceback (most recent call last):
File "C:\Python27\lib\unittest\case.py", line 327, in run
testMethod()
File "C:\Python27\lib\site-packages\nose\loader.py", line 379, in loadTestsFromName
module = resolve_name(addr.module)
File "C:\Python27\lib\site-packages\nose\util.py", line 321, in resolve_name
module = __import__('.'.join(parts_copy))
ImportError: No module named nosetests
Oh and a couple of versions ago it worked and then it stopped working. Does anyone know how to get it to work?
source to share
I am getting the same error:
/Users/kwu/my_projects/virtualenv-root/env_py/bin/python2.7 "/ Applications / PyCharm CE.app/Contents/helpers/pycharm/_jb_nosetest_runner.py" --path / Users / kwu / my_projects / frontline / Account - nosetests --cover-branch --with-coverage --cover-erase --cover-package = Account
Testing started at 13:16 ... Running Nosetest with arguments / Applications / PyCharm CE.app/Contents/helpers/pycharm /_jb_nosetest_runner.py/Users/kwu/my_projects/frontline/Accountable noses --Hidden branches - covered --cover-erase --cover -package = Account
Error
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/Users/kwu/my_projects/virtualenv-root/env_py/lib/python2.7/site-packages/nose/loader.py", line 407, in loadTestsFromName
module = resolve_name(addr.module)
File "/Users/kwu/my_projects/virtualenv-root/env_py/lib/python2.7/site-packages/nose/util.py", line 312, in resolve_name
module = __import__('.'.join(parts_copy))
ImportError: No module named nosetests
This is because my configure runner
considers nosetests
as an option.
I also check what you are considering nosetests
as an option.
source to share