[py-dev] py.test3, py.test-jython, py.test-pypy ...
David Ripton
dripton at ripton.net
Mon Dec 21 19:38:53 CET 2009
On 2009.12.20 22:48:52 +0100, holger krekel wrote:
> i just committed a change which i'd release together with a bunch
> of other things as py-1.1.2. It makes py.test install as
>
> py.test # if python executable has basename 'python'
> py.test3 # if python executable has version_info >= (3,0)
> py.test2.x # if python executable has basename 'python2.x' (x in '4567')
> py.test-jython # if we are running on jython2.5
> py.test-pypy # if we are running on pypy
>
> does this make sense to you, objections? It does for me because
> i can more easily run tests with various interpreters. But
> it means if you run "python2.4 setup.py install" you will not
> get a 'py.test2.4' only, and no 'py.test' proper.
I think it makes sense.
I have a use case for your fix. Gentoo's py.test ebuild is currently
not very useful if you have both Python 2 and Python 3 installed,
because it makes /usr/bin/py.test point to Python 3 regardless of which
version the user's has picked as the default Python using Gentoo's
python-config. (IMO this is a bug, which I reported, but it was closed
as wontfix.) I ended up having to keep Gentoo from installing Python 3
to keep them from breaking py.test. Your fix should make it easier for
distros to let the scripts for multiple Python versions to coexist.
--
David Ripton dripton at ripton.net
More information about the Pytest-dev
mailing list