bobber6467 / python-nose

Automatically exported from code.google.com/p/python-nose
0 stars 0 forks source link

The profile plugin doesn't recognize the --with-profile option (1.1.2) #452

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. pip install nose==1.1.2
2. nosetests --with-profile

What is the expected output? What do you see instead?
Should recognize the option and run with the hotshot profiler.
Instead, outputs the following:
    Usage: nosetests [options]

    nosetests: error: no such option: --with-profile

What version of the product are you using? On what operating system?
Nose 1.1.2, Python 2.7, Ubuntu 11.04

Please provide any additional information below.
The `--with-profile` option isn't mentioned in `nosetests --help` or
the options list in the documentation[1] either. It is mentioned,
however, in the Prof plugin documentation[2]: "To turn it on, use the
--with-profile option or set the NOSE_WITH_PROFILE environment
variable."

[1]: http://readthedocs.org/docs/nose/en/latest/usage.html#options
[2]: http://readthedocs.org/docs/nose/en/latest/plugins/prof.html

Original issue reported on code.google.com by akaih...@gmail.com on 2 Sep 2011 at 1:59

GoogleCodeExporter commented 8 years ago
Found the reason: I didn't have the `python-profiler` package installed in 
Ubuntu. Thus, while `import hotshot` succeeded, `from hotshot import stats` 
didn't.

It would be nice if nose could give a more guiding error message in case the 
`hotshot.stats` module is missing.

Original comment by akaih...@gmail.com on 2 Sep 2011 at 2:03