Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 423859

Summary: dev-python/tox-1.4 completion request
Product: Gentoo Linux Reporter: Ian Delaney (RETIRED) <idella4>
Component: [OLD] LibraryAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: ebuild patch
files/ patch

Description Ian Delaney (RETIRED) gentoo-dev 2012-06-27 17:19:50 UTC
Created attachment 316465 [details, diff]
ebuild patch

The test suite I found commented out.  tox's own test suite commented out.
Not any more.

archtester tox # USE_PYTHON="3.2 2.7-pypy-1.9" ebuild tox-1.4.ebuild clean test


-----------------------------------------------------------------
 * Testing of dev-python/tox-1.4 with CPython 3.2...
============================= test session starts ===========================
platform linux2 -- Python 3.2.3 -- pytest-2.2.4
tox comes from: '/mnt/gen2/TmpDir/portage/dev-python/tox-1.4/work/tox-1.4/tox/__init__.py'
collected 116 items 

tests/test_config.py ......................................................x...........
tests/test_venv.py ...........................
tests/test_z_cmdline.py .................xxx.x.

=================== 111 passed, 5 xfailed in 108.09 seconds =================
 * Testing of dev-python/tox-1.4 with PyPy 1.9 (Python 2.7)...
============================= test session starts ===========================
platform linux2 -- Python 2.7.2[pypy-1.9.0-final] -- pytest-2.2.4
tox comes from: '/mnt/gen2/TmpDir/portage/dev-python/tox-1.4/work/tox-1.4/tox/__init__.py'
collected 116 items 

tests/test_config.py ......................................................x...........
tests/test_venv.py ...........................
tests/test_z_cmdline.py ................xxxx.x.

==================== 110 passed, 6 xfailed in 86.97 seconds ====================

I put some commenting in the files/tox-1.4-rm_version_test.patch which can be re-named at pleasure.  If not deemed to warrant xfails, so be it, but as best as I can see the tests that misfire just don't like being tested before being installed.  How temperamental.

archtester tox # USE_PYTHON="2.6 2.7 3.1 3.2 2.7-pypy-1.9" ebuild tox-1.4.ebuild clean merge

>>> Original instance of package unmerged safely.
 * Compilation and optimization of Python modules for CPython 2.6     [ ok ]
 * Compilation and optimization of Python modules for CPython 2.7     [ ok ]
 * Compilation and optimization of Python modules for CPython 3.1     [ ok ]
 * Compilation and optimization of Python modules for CPython 3.2     [ ok ]
 * Compilation and optimization of Python modules for PyPy 1.9
 (Python 2.7)[ ok ]
>>> dev-python/tox-1.4 merged.

good to go
Comment 1 Ian Delaney (RETIRED) gentoo-dev 2012-06-27 17:23:57 UTC
Created attachment 316467 [details, diff]
files/ patch
Comment 2 Ian Delaney (RETIRED) gentoo-dev 2012-07-17 13:33:12 UTC
archtester tox # USE_PYTHON="2.5 2.6 2.7 3.1 3.2" ebuild tox-1.4.1.ebuild clean test

 * Testing of dev-python/tox-1.4.1 with CPython 2.5...
============== 110 passed, 2 xfailed, 4 xpassed in 75.91 seconds ===============

 * Testing of dev-python/tox-1.4.1 with CPython 2.6...
============== 111 passed, 2 xfailed, 3 xpassed in 78.60 seconds ===============

 * Testing of dev-python/tox-1.4.1 with CPython 2.7...
============== 111 passed, 2 xfailed, 3 xpassed in 81.88 seconds ===============

 * Testing of dev-python/tox-1.4.1 with CPython 3.1...
============== 111 passed, 2 xfailed, 3 xpassed in 111.17 seconds ==============

* Testing of dev-python/tox-1.4.1 with CPython 3.2...
============== 111 passed, 2 xfailed, 3 xpassed in 113.12 seconds ==============


The line I initially entered to weed out pypy is not being read and therefore tripped over by pythons 2.5 2.6 3.1 and some instances of 3.2.  The code I had pointed to a serial attribute belonging to pypy. The cpythons list the attributes in a tuple but have the atrribute names.  I simply replaced the code with content that does the same test but doesn't present attributes that are absent in the other cpython versions.

Doesn't warrant a whole new patch.  Just do a replace of 
"sys.version_info.serial > 0"
with 
"42 in sys.version_info"

in the files/rm_version_test.patch or however it is named
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2012-11-01 17:20:41 UTC
  31 Oct 2012;  <idella4@gentoo.org> +files/tox-1.4.2-rm_version_test.patch,
  tox-1.4.2.ebuild:
  Added patch to xfail flawed tests, added doc use flag

$ USE_PYTHON="2.5 2.6 2.7 3.1 3.2" ebuild tox-1.4.2.ebuild clean test

 * Testing of dev-python/tox-1.4.2 with CPython 2.5...
============== 110 passed, 1 xfailed, 5 xpassed in 64.46 seconds ===============

 * Testing of dev-python/tox-1.4.2 with CPython 2.6...
============== 111 passed, 1 xfailed, 4 xpassed in 68.26 seconds ===============

 * Testing of dev-python/tox-1.4.2 with CPython 2.7...
============== 111 passed, 1 xfailed, 4 xpassed in 66.87 seconds ===============

 * Testing of dev-python/tox-1.4.2 with CPython 3.1...
============== 111 passed, 1 xfailed, 4 xpassed in 98.13 seconds ===============

 * Testing of dev-python/tox-1.4.2 with CPython 3.2...
t============== 111 passed, 1 xfailed, 4 xpassed in 100.19 seconds ==============