[TIP] Testing optparse with Nosetests

Tim Aerdts fragger123 at gmail.com
Tue Oct 30 03:00:53 PDT 2012


Just a follow-up.

If I add the options that I use with nosetests (--with-coverage --verbose
--cover-package=mypackage) to my own optparser it works as expected.

I don't understand this, and preferably I don't need those dependencies in
my main application..

On Tue, Oct 30, 2012 at 9:42 AM, Tim Aerdts <fragger123 at gmail.com> wrote:

> Hello,
>
> Posting this here because it seems more active then the Nosetests users
> list.
> Anyway I am in the process of writing an application which makes use of
> Optparse. I'm running the tests with Nosetests but I fear these two might
> be interfering?
>
> When I run parser.parse_args() anywhere in my code Nosetests bugs out.
>
> Usage: nosetests [options]
> nosetests: error: no such option: --with-coverage
>
> Removing the call to parse_args() and everything runs fine.
>
> Cheers,
>
> --
> Kind regards,
> Tim Aerdts
> http://www.tuimz.nl
>



-- 
Kind regards,
Tim Aerdts
http://www.tuimz.nl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20121030/a4e2ceaf/attachment.htm>


More information about the testing-in-python mailing list