Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 293913 - dev-python/logilab-common-0.53.0 fails tests with Python 2.7
Summary: dev-python/logilab-common-0.53.0 fails tests with Python 2.7
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Python Gentoo Team
URL: http://lists.logilab.org/pipermail/py...
Whiteboard:
Keywords:
: 327799 (view as bug list)
Depends on:
Blocks: python-2.7
  Show dependency tree
 
Reported: 2009-11-21 02:13 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2011-01-17 18:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-11-21 02:13:44 UTC
dev-python/logilab-common-0.45.1 doesn't work with Python 2.7.
It tries to use private unittest._TextTestResult which has been removed.

$ pytest
Traceback (most recent call last):
  File "/usr/bin/pytest", line 3, in <module>
    from logilab.common.pytest import run
  File "/usr/lib64/python2.7/site-packages/logilab/common/pytest.py", line 114, in <module>
    from logilab.common import testlib
  File "/usr/lib64/python2.7/site-packages/logilab/common/testlib.py", line 237, in <module>
    class SkipAwareTestResult(unittest._TextTestResult):
AttributeError: 'module' object has no attribute '_TextTestResult'
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-04-28 17:15:13 UTC
Deprecated unittest._TextTestResult has been restored in Python 2.7, but tests now fail due to usage of private unittest.TestCase._exc_info.
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-09-18 22:05:32 UTC
dev-python/logilab-common-0.51.1 uses my patch, which fixes majority of test failures. Usage of SkipAwareTestResult might also need to be improved.
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-09-19 18:15:15 UTC
*** Bug 327799 has been marked as a duplicate of this bug. ***
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-09-29 00:44:56 UTC
dev-python/logilab-common-0.52.0 has introduced additional test failures with Python 2.7.
Comment 5 Matthias Liebig 2010-12-02 16:10:28 UTC
Using logilab-common-0.53 (not in tree yet), only one test fails:

test_xml_valid (unittest_testlib.TestlibTC)
tests xml is valid ... unhandled exception occurred while testing unittest_testlib
Traceback (most recent call last):
 ...
AttributeError: 'MockTestCase' object has no attribute '_testMethodName'


It doesn't seem to be related to python-2.7. The unit test calls assertXMLStringWellFormed() in testlib.py, which calls _assertETXMLWellFormed() with xml.etree.ElementTree.fromstring. The latter is expected to fail on invalid xml, and it does with xml.etree.ElementTree.ParseError. But only xml.parsers.expat.ExpatError is handled.
Comment 6 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-12-05 21:10:34 UTC
(In reply to comment #5)

Please send your suggestions to python-projects@lists.logilab.org mailing list.
Comment 7 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-01-17 18:00:02 UTC
Fixed in dev-python/logilab-common-0.54.0.