Summary: | dev-python/python-openid-2.2.5 fails tests | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Paweł Hajdan, Jr. (RETIRED) <phajdan.jr> |
Component: | [OLD] Development | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gentoo |
Priority: | Normal | Keywords: | TESTFAILURE |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log.gz
files/eof-test.patch |
Description
Paweł Hajdan, Jr. (RETIRED)
2012-05-18 16:43:27 UTC
Created attachment 312997 [details, diff]
files/eof-test.patch
archtester python-openid # USE_PYTHON="2.5 2.6" ebuild python-openid-2.2.5.ebuild clean test
yields
.................................................................................................................../openid/test/test_fetchers.py:101: UserWarning: Skipping tests for 'httplib2' fetcher because the library did not import.
'the library did not import.' % (library_name,))
Ran 1361 tests in 3.174s OK
for both Python2.5 2.6. It still registered a pass for the tests.
openid/test/test_fetchers.py is the file that suffers the first three. Since mine actually pass I can't determine a root cause.
The fourth however did fail here.
self.failUnless(self.expected == 'EOF', (self.case, self.expected))
AssertionError: ('<!bad processing instruction!>\n', 'None')
The value of self.expected is tested against 'EOF' but its value is 'None' and self.case has acquired '<!bad processing instruction!> . Clearly self.expected need have the value 'EOF' and not None.
The test will pass with values of both are 'EOF'.
'<!bad processing instruction!>\n' is the last line of the file that is being read, openid/test/data/test1-parsehtml.txt. This appears to be data that can never pass. The second last line is None which is acquired by self.expected.
archtester python-openid # USE_PYTHON="2.7" ebuild python-openid-2.2.5.ebuild clean test
----------------------------------------------------------------------
Ran 1361 tests in 3.064s OK
The patch that returns a pass to this test sets the second last line to 'EOF' and also the last line. Importantly the \n at the end of file also needs to be taken out. i.e. <!bad processing instruction!>\n -> 'EOF'
self.failUnless(self.expected == 'EOF', (self.case, self.expected))
then returns ('EOF','EOF') and the test passes. It doesn't interfere with any other test results.
I also used ('None','None') but it didn't register a pass unless I missed something. To me it appears the last 2 lines are at fault. But I'm not a python guru.
Test suite passes with CPython 2.6 and probably older versions of CPython 2.7... commit f052ebd (HEAD, master) Author: Patrice Clement <monsieurp@gentoo.org> Date: Fri Jan 1 03:35:35 2016 +0000 dev-python/python-openid: Remove a failing test. Fixes bug 416517. Package-Manager: portage-2.2.20.1 Signed-off-by: Patrice Clement <monsieurp@gentoo.org> create mode 100644 dev-python/python-openid/files/python-openid-2.2.5-tests.patch |