I have two versions of a C library, one with a ctypes wrapper and one with a
Boost.Python wrapper. The test cases for the ctypes wrapped version run
about 5x faster than the Boost.Python wrapped version overall. I except the
ctypes version to be faster, but not by that much. I'd like to focus my
attention primarily on those test cases with the largest differences to try
and figure out what's going on. Upgrading to a newer version is no problem.
Thanks,
--
Skip Montanaro - sk...@pobox.com - http://www.smontanaro.net/
You could use the builtin --with-profile plugin to get stats per test.
Otherwise you could write a simple plugin that started a timer in
startTest() and finished it in addError(), addSuccess(), or
addFailure()
>
> Thanks,
>
> --
> Skip Montanaro - sk...@pobox.com - http://www.smontanaro.net/
>
> --
> You received this message because you are subscribed to the Google Groups "nose-users" group.
> To post to this group, send email to nose-...@googlegroups.com.
> To unsubscribe from this group, send email to nose-users+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nose-users?hl=en.
>
>
Thanks. I guess maybe I ought to figure out how to write a "simple plugin",
huh?
Skip
Xunit already does exactly this to report time between tests in Hudson
metrics. You could copy its Plugin class:
http://bitbucket.org/jpellerin/nose/src/tip/nose/plugins/xunit.py
For some reason it uses %d to format the time which cuts off decimals.
I'm not sure if that's a bug or not. Hmm.
btw, here's how to activate custom plugins for one-time use:
http://somethingaboutorange.com/mrl/projects/nose/0.11.2/plugins/writing.html#registering-a-plugin-without-setuptools
>
> Skip
Thanks. Is there a "hello world" for plugins though? I haven't the
slightest idea how Nose would even find a plugin, let alone run it. I
Googled for "nose plugins" and landed here (first hit):
http://somethingaboutorange.com/mrl/projects/nose/doc/plugin_interface.html
but that doesn't seem to tell me how to install a plugin so Nose can find
it. (It might, but I could well be missing it. For example, neither
"install" nor "search" appear on that page. I'd sort of expect one of them
to turn up on a page about writing plugins.)
I then tried Googling for "nose plugins tutorial" which yielded this:
http://python-nose.googlecode.com/svn/wiki/WritingPlugins.wiki
which looks like it has more of what I'm after ("For nose to find a
plugin..."), but it bothers me that this page doesn't seem to be current. I
can't find it in the Nose wiki:
http://code.google.com/p/python-nose/w/list
Kumar> btw, here's how to activate custom plugins for one-time use:
Kumar> http://somethingaboutorange.com/mrl/projects/nose/0.11.2/plugins/writing.html#registering-a-plugin-without-setuptools
Thanks. That does help. Is somethingaboutorange.com the official Nose
project site or is it a Google Code project (which seems to be utterly
devoid of any documentation)? And what is nose-plugins.jottit.com?
It's all a bit confusing. Documentation-wise, anyway.
Skip
If you click on Developing With Nose then after a few clicks you might
arrive at Write Plugins:
http://somethingaboutorange.com/mrl/projects/nose/0.11.2/plugins/writing.html
That has some recipes but I agree it could use a simple Hello World
plugin before the recipes section.
http://nose-plugins.jottit.com/ is some attempt at a "plugin
repository" maintained by me.