[code-quality] How and where to add tests for Python 3

Ian Cordasco graffatcolmingov at gmail.com
Mon Aug 25 02:24:39 CEST 2014


On Sun, Aug 24, 2014 at 3:07 PM, François Magimel
<francois.magimel at etu.enseeiht.fr> wrote:
> Hello!
>
> I'm new in this mailing, so I will introduce myself first. I'm François
> (alias Linkid), a French engineering student who code mainly in Python.
> I'm involved in some open source projects and some of them like Django
> or OpenStack.
>
> I would like to add a test for Python 3 to check an import, but I don't
> really know on which project (pep8, pyflakes, …) to do that and how to
> do it (by a push request on github or somewhere else, by a bug report,
> …). I searched some clue and I think my test should be used by pyflakes,
> but I'm not sure… So, here are my questions:
> - on which project should I add a Python 3 import test ?
> - how I should process ?
>
> I think it could help be a lot if someone explain me what one project
> really check, if it is possible.
>
> Thank you.
>
> François Magimel (Linkid)

Hello François,

I'm not quite sure anyone on this list can answer your question. You
haven't given us any guidance about what the check is that you would
like to add. Do you want to check for imports that are not used in
Python 3? Are you looking for imports that would fail on Python 3
instead? Are you looking to ensure some style of imports? Perhaps
you're looking to do what openstack/hacking already does (ensure only
modules are imported)? There are too many possibilities for us to be
helpful.

Further, unless what you wish to add is part of
http://legacy.python.org/dev/peps/pep-0008/, I can at least tell you
that it does *not* belong in pep8. If you can give us more details I
can also tell you whether it belongs in PyFlakes. If it turns out it
does not belong in PyFlakes, you can always write and release your own
plugin for Flake8.

Sorry I cannot be more helpful,
Ian


More information about the code-quality mailing list