[apparmor] [patch] utils: make test-severity pyflakes compliant
Steve Beattie
steve at nxnw.org
Fri Nov 14 18:03:36 UTC 2014
On Thu, Nov 13, 2014 at 06:19:57PM +0100, Christian Boltz wrote:
> That said - we have "make check" and "make test". Maybe we should merge
> them into one target so that one command will check everything.
>
> Hmm, maybe using
> test: check
> in the Makefile would already improve the situation.
Err, I don't see that anywhere in the utils/ tree. Generally, as
we've added tests, we've followed the convention to use 'check' as
the target; the biggest exception that I know of in the tree is the
regression tests, and that's a historical artifact due to it being
the first set of tests implemented. The parser also has 'tests'
targets, but they are wrapped under the check target; admittedly,
it could be flattened into just the 'check' target.
In general, I concur that 'make check' should run all the tests.
> > complaints are of marginal impact (assigning to a variable that isn't
> > later referenced); however, one legitimate issue it detected is that
> > I'd inadvertently created two test cases with the same method name,
> > so only one test case would actually be used.
>
> That's the problem with copy&paste-programming ;-)
Tis' true. Though you'll note that pyflakes can catch some stuff like
this. And I've also seen people have autogenerated test methods under
pyunit that ended up with name collisions and thus not have as many
tests actually executed as expected. And it makes for more difficult
test isolation for debugging failures. So there's trade offs.
--
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20141114/63ca7936/attachment.pgp>
More information about the AppArmor
mailing list