ebook-utils / css-parser

CSS related utilities (parsing, serialization, etc) for python
GNU Lesser General Public License v3.0
31 stars 5 forks source link

Handle test failure when no network connection #5

Closed keszybz closed 5 years ago

keszybz commented 5 years ago

This allows the test to pass in a network-less build environment.

This is a partial fix only. A similar error occurs in css_parser_tests/test_errorhandler.py:

======================================================================
FAIL: test_handlers (css_parser_tests.test_errorhandler.ErrorHandlerTestCase)
css_parser.log
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/css-parser-1.0.4/css_parser_tests/test_errorhandler.py", line 107, in test_handlers
    'ERROR    Expected "text/css" mime type')
AssertionError: u'' != u'ERROR    Expected "text/css" mime type'
+ ERROR    Expected "text/css" mime type

----------------------------------------------------------------------
Ran 394 tests in 4.496s

FAILED (failures=1)

But I don't know how to fix that one. I think that the test might be exposing a bug in the code, because the handler log is empty, no error about an unresolvable hostname is logged.

keszybz commented 5 years ago

Any idea for the other failure?

kovidgoyal commented 5 years ago

I

kovidgoyal commented 5 years ago

I fixed that in my merge commit as well.

keszybz commented 5 years ago

I see, thanks!