[openstack-dev] Hacking 0.7 Released (for a bug fix)

Joe Gordon joe.gordon0 at gmail.com
Thu Aug 15 21:18:06 UTC 2013


On Thu, Aug 15, 2013 at 2:04 PM, Robert Collins
<robertc at robertcollins.net>wrote:

> On 16 August 2013 08:33, Joe Gordon <joe.gordon0 at gmail.com> wrote:
> > Hi All,
> >
> > Hacking 0.7 has just been released, and merged into
> openstack/requirements
> > (https://review.openstack.org/#/c/41523/),  due to a bug in hacking 0.6
> that
> > made H202, 'assertRaises Exception too broad', not work
> > (https://bugs.launchpad.net/hacking/+bug/1206302).
> >
> > Additionally Hacking 0.7 has support to specify import exceptions in
> tox.ini
> > so you don't have to put #noqa everywhere
> > (https://bugs.launchpad.net/hacking/+bug/1206189).  This can be used to
> > ignore the gettext line that doesn't import a module.  In nova this looks
> > like https://review.openstack.org/#/c/38851/2/tox.ini.
> >
> >
> > best,
> > Joe Gordon
>
> Cool! This should let testtools.matchers be used sanely ;)
>
> Does it support 'module.*' as a way to say 'permit everything from
> this module' ?
>
>
Yup, although it uses a slightly different notation, the check compares
imports to the import_exceptions list using the startswith operator (
https://github.com/openstack-dev/hacking/blob/master/hacking/core.py#L87).

so you would just add 'testtools.matchers' to import_exceptions


>  --
> Robert Collins <rbtcollins at hp.com>
> Distinguished Technologist
> HP Converged Cloud
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130815/1a48516e/attachment.html>


More information about the OpenStack-dev mailing list