On 10/29/2012 09:49 AM, Ralph Bean wrote:
Cole, thanks for looking into this.
On Thu, Oct 18, 2012 at 05:40:05PM -0400, Cole Robinson wrote:
> 1) How can I test future changes to make sure they work on both python2 and
> python3?
While developing, I'll have two terminals open each with a different
virtualenv[1] activated: one for python-2.7 and the other for python-3.2.
I'll use nosy.py[2] in each terminal to re-run the test suite each
time I change a file. This helps catch errors early.
A popular tool for testing a library against multiple python versions
is tox[3]. I have used it on other people's projects but haven't yet
taken the time to set it up on any of my own; it looks more robust than
my nosy.py setup, but I can't really vouch for it yet.
Lastly, I rely pretty heavily on external continuous integration
systems like travis-ci[4]. If python-bugzilla has %check enabled for
both python and python3-bugzilla, then koji can provide some
safeguards. I think there is some activity in Fedora Infra to set up a
jenkins instance in our hosted cloud -- that can probably help with
cross-python testing soon, too.
-Ralph
[1]
http://www.virtualenv.org
[2]
http://github.com/ralphbean/threebean-dot-files/blob/master/content/bin/n...
[3]
http://tox.testrun.org
[4]
http://travis-ci.org
Thanks for the info Ralph. I still haven't forgotten about this.
However given that there's an RH bugzilla upgrade coming soon that will again
break the majority of python-bugzilla usage, I'm holding off on this work
until after the next release, since I still want to get an update into epel
for RHEL5.
Hopefully this is the last time an rhbz upgrade causes these types of
problems, since we are dropping most of the RH specific code from python-bugzilla.
- Cole