Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'nosetests' not recognized on Windows after being installed and added to PATH

I'm on exercise 46 of Learn Python the Hard Way, and I'm meant to install nose and run nosetests. I've installed nose already using pip, but when I run nosetests in the directory above the 'tests' folder, I get the error:

'nosetests' is not recognized as an internal or external command, operable program or batch file.

If it's relevant, I've already modified the PATH variable to include full path of Python27/Scripts and Python/Lib/site-package.

like image 804
user1651576 Avatar asked Sep 08 '12 06:09

user1651576


People also ask

How does nosetests find tests?

nose collects tests automatically from python source files, directories and packages found in its working directory (which defaults to the current working directory). Any python source file, directory or package that matches the testMatch regular expression (by default: (?:^|[b_.

Which command is used to run nose tests?

nose can be integrated with DocTest by using with-doctest option in athe bove command line. The result will be true if the test run is successful, or false if it fails or raises an uncaught exception. nose supports fixtures (setup and teardown methods) at the package, module, class, and test level.

Which of the following command is used to discover all tests in a project and execute them using nose?

pytest is capable of discovering and running tests written in unittest and nose. State true or false.


1 Answers

If you are still having trouble after following Warren Weckesser's instructions try uninstalling and reinstalling.

Using pip: pip uninstall nose

I found this worked for me on Windows 8 64 bit

like image 52
Friendm1 Avatar answered Sep 20 '22 12:09

Friendm1