[TIP] coverage.py with Py2 and Py3
Sean Robinson
seankrobinson at gmail.com
Sat Apr 9 08:15:36 PDT 2011
I read the virtualenv docs earlier this morning and I had decided it
was not what I was looking for, but I'll give it a closer look. Is
virtualenv what others are using for this type of situation?
On Sat, Apr 9, 2011 at 7:42 AM, Ned Batchelder <ned at nedbatchelder.com> wrote:
> For testing more than one Python, I would use virtualenvs, one for each
> version of Python. Then installing coverage.py (or any package) should
> write the scripts to the proper bin directory, with no conflicts. Is that
> not what you're seeing?
>
> --Ned.
>
> On 4/9/2011 10:39 AM, Sean Robinson wrote:
>>
>> Hello all,
>>
>> I am developing a Python library for Py2 and Py3 in a single code
>> base. I have begun using coverage.py and it has highlighted several
>> bugs and pointless code. In the Py2 code paths only.
>>
>> How can I install coverage.py for use in both Py2 and Py3? I
>> installed coverage.py for Py2, but it looks like installing it in Py3,
>> also, will overwrite the script launcher to use Py3. Is there a way
>> to use coverage.py in both, serially? Does anyone have any pointers
>> to more info?
>>
>> I am using coverage with stdlib unittest, so:
>>
>> coverage run --branch ./setup.py test
>>
>> and
>>
>> coverage html
>>
>> give me an excellent report of my Py2 problems and successes. Thank
>> you, Ned.
>>
>>
>
--
Sean Robinson
WiFi Radar - http://wifi-radar.berlios.de
Python WiFi - http://pythonwifi.wikispot.org
pymnl - http://pymnl.wikispot.org
More information about the testing-in-python
mailing list