Query nose version from python

17 views
Skip to first unread message

Kristian Nørgaard

unread,
Jan 3, 2014, 5:17:41 AM1/3/14
to nose-...@googlegroups.com
Hi, nose newbee here.
I have a python script that wraps my call to nose.run(...).

I want to test which version of nose I am running from my python script.
I know I could call the system command "nosetests --version" but that seems a bit awkward.

Can I query the version directly through the nose module?

A bit harder:
Can I query the version of nose plugins through the nose module?

Thanks,
Kristian


Jonathan Rogers

unread,
Jan 3, 2014, 5:59:10 AM1/3/14
to nose-...@googlegroups.com
Yes, like many Python modules, it defines __version__, so you can do
'import nose; print nose.__version__'

--
Jonathan Rogers

Kristian Nørgaard

unread,
Jan 3, 2014, 7:25:31 AM1/3/14
to nose-...@googlegroups.com
So simple, thanks a lot.
I guess that really exposed my limited python knowledge :-)



On Fri, Jan 3, 2014 at 11:59 AM, Jonathan Rogers <jonatha...@gmail.com> wrote:

--
You received this message because you are subscribed to a topic in the Google Groups "nose-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nose-users/h7z05i5Z1tU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nose-users+...@googlegroups.com.
To post to this group, send email to nose-...@googlegroups.com.
Visit this group at http://groups.google.com/group/nose-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages