<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 15, 2013 at 2:04 PM, Robert Collins <span dir="ltr"><<a href="mailto:robertc@robertcollins.net" target="_blank">robertc@robertcollins.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">On 16 August 2013 08:33, Joe Gordon <<a href="mailto:joe.gordon0@gmail.com">joe.gordon0@gmail.com</a>> wrote:<br>


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

<div><br></div><div>so you would just add 'testtools.matchers' to import_exceptions</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<span class=""><font color="#888888">
--<br>
Robert Collins <<a href="mailto:rbtcollins@hp.com">rbtcollins@hp.com</a>><br>
Distinguished Technologist<br>
HP Converged Cloud<br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</font></span></blockquote></div><br></div></div>