JesseTrevve
JesseTrevve

Reputation: 303

Error running nosetests

I recently reinstalled nose to run tests on my code.

https://nose.readthedocs.org/en/latest/

I used

sudo pip install nose

and went to my project folder. The response is

-bash: nosetests: command not found.

So, I once again I uninstalled and tried installing nose with MacPorts:

sudo port install py27-nose

In my project folder, I run

nosetests-2.7 filename.py

and I get the following error:

ERROR: Failure: ImportError (No module named nose_parameterized)

What's the problem?

EDIT: More information. nose is installed. I get Successfully installed nose-1.3.6.

Upvotes: 5

Views: 7864

Answers (2)

JesseTrevve
JesseTrevve

Reputation: 303

So, the way I've made it work is by specifically downloading nose-parameterized

sudo pip install nose-parameterized

Previously nose would work in the project's directory, but the trials would always be very quick. For example,

Ran 0 tests in 0.002s

I'm more confused now than previously. Why would I have to download nose-parameterized individually?

Upvotes: 11

Josh J
Josh J

Reputation: 6893

I don't have any experience with MacPorts python but I know that Homebrew installs python using a completely different site-packages setup than the OS X provided versions. From the looks of your error messages, it looks like you were mixing a matching the system pip and the ports python which could be the cause of your issue.

Upvotes: 0

Related Questions