test_from_file tests fail
mcepl opened this issue · 1 comments
mcepl commented
When packaging this package for openSUSE/Tumbleweed, test suite fails in the calls to test_from_file
tests:
[ 14s] =================================== FAILURES ===================================
[ 14s] ____________________ test_from_file[combined_data/silence3] ____________________
[ 14s]
[ 14s] self = <defusedxml.ElementTree.DefusedXMLParser object at 0x7f523a776208>
[ 14s] data = b'Hello world!\r\n'
[ 14s]
[ 14s] def feed(self, data):
[ 14s] """Feed encoded data to parser."""
[ 14s] try:
[ 14s] > self.parser.Parse(data, 0)
[ 14s] E xml.parsers.expat.ExpatError: syntax error: line 1, column 0
[ 14s]
[ 14s] /usr/lib64/python3.6/xml/etree/ElementTree.py:1624: ExpatError
[ 14s]
[ 14s] During handling of the above exception, another exception occurred:
[ 14s]
[ 14s] input_from_file = ([Exchange(<Request GET>, [<Response 200>])], [1039])
[ 14s]
[ 14s] def test_from_file(input_from_file): # pylint: disable=redefined-outer-name
[ 14s] (exchanges, expected) = input_from_file
[ 14s] for exch in exchanges:
[ 14s] > check_exchange(exch)
[ 14s]
[ 14s] test/test_from_files.py:48:
[ 14s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/exchange.py:65: in check_exchange
[ 14s] response.check_responses(exch.responses)
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/response.py:215: in check_responses
[ 14s] check_response(resp)
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/response.py:220: in check_response
[ 14s] check_response_itself(resp)
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/response.py:229: in check_response_itself
[ 14s] message.check_message(resp)
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/message.py:280: in check_message
[ 14s] _ = msg.xml_data
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/blackboard.py:105: in prop
[ 14s] self.memoized[getter.__name__] = getter(self)
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/message.py:152: in xml_data
[ 14s] return defusedxml.ElementTree.fromstring(self.decoded_body)
[ 14s] /usr/lib/python3.6/site-packages/defusedxml/common.py:126: in fromstring
[ 14s] parser.feed(text)
[ 14s] /usr/lib64/python3.6/xml/etree/ElementTree.py:1626: in feed
[ 14s] self._raiseerror(v)
[ 14s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 14s]
[ 14s] self = <defusedxml.ElementTree.DefusedXMLParser object at 0x7f523a776208>
[ 14s] value = ExpatError('syntax error: line 1, column 0',)
[ 14s]
[ 14s] def _raiseerror(self, value):
[ 14s] err = ParseError(value)
[ 14s] err.code = value.code
[ 14s] err.position = value.lineno, value.offset
[ 14s] > raise err
[ 14s] E File "<string>", line None
[ 14s] E xml.etree.ElementTree.ParseError: syntax error: line 1, column 0
[ 14s]
[ 14s] /usr/lib64/python3.6/xml/etree/ElementTree.py:1525: ParseError
[ 14s] _____________________ test_from_file[combined_data/1039_1] _____________________
[ 14s]
[ 14s] self = <defusedxml.ElementTree.DefusedXMLParser object at 0x7f523a77dfd0>
[ 14s] data = b'<doc>\r\n <item type=text>Hello world!</item>\r\n</doc>\r\n'
[ 14s]
[ 14s] def feed(self, data):
[ 14s] """Feed encoded data to parser."""
[ 14s] try:
[ 14s] > self.parser.Parse(data, 0)
[ 14s] E xml.parsers.expat.ExpatError: not well-formed (invalid token): line 2, column 13
[ 14s]
[ 14s] /usr/lib64/python3.6/xml/etree/ElementTree.py:1624: ExpatError
[ 14s]
[ 14s] During handling of the above exception, another exception occurred:
[ 14s]
[ 14s] input_from_file = ([Exchange(<Request GET>, [<Response 200>])], [1039])
[ 14s]
[ 14s] def test_from_file(input_from_file): # pylint: disable=redefined-outer-name
[ 14s] (exchanges, expected) = input_from_file
[ 14s] for exch in exchanges:
[ 14s] > check_exchange(exch)
[ 14s]
[ 14s] test/test_from_files.py:48:
[ 14s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/exchange.py:65: in check_exchange
[ 14s] response.check_responses(exch.responses)
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/response.py:215: in check_responses
[ 14s] check_response(resp)
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/response.py:220: in check_response
[ 14s] check_response_itself(resp)
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/response.py:229: in check_response_itself
[ 14s] message.check_message(resp)
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/message.py:280: in check_message
[ 14s] _ = msg.xml_data
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/blackboard.py:105: in prop
[ 14s] self.memoized[getter.__name__] = getter(self)
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/message.py:152: in xml_data
[ 14s] return defusedxml.ElementTree.fromstring(self.decoded_body)
[ 14s] /usr/lib/python3.6/site-packages/defusedxml/common.py:126: in fromstring
[ 14s] parser.feed(text)
[ 14s] /usr/lib64/python3.6/xml/etree/ElementTree.py:1626: in feed
[ 14s] self._raiseerror(v)
[ 14s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 14s]
[ 14s] self = <defusedxml.ElementTree.DefusedXMLParser object at 0x7f523a77dfd0>
[ 14s] value = ExpatError('not well-formed (invalid token): line 2, column 13',)
[ 14s]
[ 14s] def _raiseerror(self, value):
[ 14s] err = ParseError(value)
[ 14s] err.code = value.code
[ 14s] err.position = value.lineno, value.offset
[ 14s] > raise err
[ 14s] E File "<string>", line None
[ 14s] E xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 2, column 13
[ 14s]
[ 14s] /usr/lib64/python3.6/xml/etree/ElementTree.py:1525: ParseError
[ 14s] _________________ test_from_file[combined_data/showcase.https] _________________
[ 14s]
[ 14s] self = <defusedxml.ElementTree.DefusedXMLParser object at 0x7f523a9f42e8>
[ 14s] data = b'<?xml version="1.0"?>\n<article>\n <title>The Rise & Fall of Lorem Ipsum</title>\n <text align="left">\n Lorem ...ontes, nascetur ridiculus mus. Vestibulum vel mi molestie, aliquam turpis et, elementum elit.\n </text>\n</article>\n'
[ 14s]
[ 14s] def feed(self, data):
[ 14s] """Feed encoded data to parser."""
[ 14s] try:
[ 14s] > self.parser.Parse(data, 0)
[ 14s] E xml.parsers.expat.ExpatError: not well-formed (invalid token): line 3, column 19
[ 14s]
[ 14s] /usr/lib64/python3.6/xml/etree/ElementTree.py:1624: ExpatError
[ 14s]
[ 14s] During handling of the above exception, another exception occurred:
[ 14s]
[ 14s] input_from_file = ([Exchange(<Request PUT>, [<Response 406>])], [1000, 1000, 1039, 1063, 1090, 1093, ...])
[ 14s]
[ 14s] def test_from_file(input_from_file): # pylint: disable=redefined-outer-name
[ 14s] (exchanges, expected) = input_from_file
[ 14s] for exch in exchanges:
[ 14s] > check_exchange(exch)
[ 14s]
[ 14s] test/test_from_files.py:48:
[ 14s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/exchange.py:62: in check_exchange
[ 14s] request.check_request(exch.request)
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/request.py:213: in check_request
[ 14s] message.check_message(req)
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/message.py:280: in check_message
[ 14s] _ = msg.xml_data
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/blackboard.py:105: in prop
[ 14s] self.memoized[getter.__name__] = getter(self)
[ 14s] ../../BUILDROOT/python-HTTPolice-0.9.0-0.x86_64/usr/lib/python3.6/site-packages/httpolice/message.py:152: in xml_data
[ 14s] return defusedxml.ElementTree.fromstring(self.decoded_body)
[ 14s] /usr/lib/python3.6/site-packages/defusedxml/common.py:126: in fromstring
[ 14s] parser.feed(text)
[ 14s] /usr/lib64/python3.6/xml/etree/ElementTree.py:1626: in feed
[ 14s] self._raiseerror(v)
[ 14s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 14s]
[ 14s] self = <defusedxml.ElementTree.DefusedXMLParser object at 0x7f523a9f42e8>
[ 14s] value = ExpatError('not well-formed (invalid token): line 3, column 19',)
[ 14s]
[ 14s] def _raiseerror(self, value):
[ 14s] err = ParseError(value)
[ 14s] err.code = value.code
[ 14s] err.position = value.lineno, value.offset
[ 14s] > raise err
[ 14s] E File "<string>", line None
[ 14s] E xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 3, column 19
[ 14s]
[ 14s] /usr/lib64/python3.6/xml/etree/ElementTree.py:1525: ParseError
[ 14s] =========================== short test summary info ============================
[ 14s] FAILED test/test_from_files.py::test_from_file[combined_data/silence3] - Fi...
[ 14s] FAILED test/test_from_files.py::test_from_file[combined_data/1039_1] - File...
[ 14s] FAILED test/test_from_files.py::test_from_file[combined_data/showcase.https]
[ 14s] ======================== 3 failed, 748 passed in 9.02s =========================
[ 14s] error: Bad exit status from /var/tmp/rpm-tmp.AmsEsl (%check)
[ 14s]
Complete build log with all details and versions of used packages.
vfaronov commented
Thank you for reporting. In the two years since I last worked on HTTPolice, the development/QA environment has bitrotted: everything fails everywhere with various errors. I will do a maintenance release to restore compatibility with the current everything, but it’s unlikely I’ll get around to it in the next three months or so.