yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #60332
[Bug 1652458] Re: Tests unnecessarily use pep8 internals
Reviewed: https://review.openstack.org/416830
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=b63cc5f71dae6cecbdc91ff27bc469e5c3ea514e
Submitter: Jenkins
Branch: master
commit b63cc5f71dae6cecbdc91ff27bc469e5c3ea514e
Author: Steve Martinelli <s.martinelli@xxxxxxxxx>
Date: Wed Jan 4 23:57:52 2017 -0500
Use public interfaces of pep8 for hacking
Rather than using mock and pep8 internals, we can use
public interfaces of pep8 to register our custom
hacking checks. Further, if pep8 isn't present for testing purposes,
we can simply use pycodestyle. Many distributions are shipping the
latter these days instead of pep8.
Closes-Bug: 1652458
Co-Authored-By: Ian Cordasco <graffatcolmingov@xxxxxxxxx>
Change-Id: Ica719703c54a295d10ea800467b25a5d0f65348a
Signed-off-by: Adam Williamson <awilliam@xxxxxxxxxx>
** Changed in: keystone
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1652458
Title:
Tests unnecessarily use pep8 internals
Status in OpenStack Identity (keystone):
Fix Released
Status in python-keystoneclient:
Fix Released
Bug description:
test_hacking_checks.py isn't aware of the pep8 library being renamed
pycodestyle; it's trivial to have it work with either name.
The test also uses a rather unnecessarily baroque method to run only
the K333 check; it's really not necessary to mock patch pep8's
internals to do this, you can use its public API just as well.
Here's a patch which fixes both issues. I'm really not interested in
jumping through fifteen thousand hoops and signing my firstborn over
to the openstack foundation just to submit some patches I wrote in the
course of distro package fixing. I work for Red Hat, which is (I
believe) a corporate member of the the foundation, so I don't even
know if it's appropriate/allowed for me to sign up as a personal
member.
If it helps, I'm happy to declare this patch available under a very
permissive license like CC-0, or just sign it over to a contributor,
for the purpose of getting it merged.
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1652458/+subscriptions