[issue29177] skip tests using socketserver.UnixStreamServer when bind() raises PermissionError

Xavier de Gaye report at bugs.python.org
Fri Jan 6 07:05:18 EST 2017


Xavier de Gaye added the comment:

test_logging fails also with the following backtrace:

======================================================================
FAIL: test_output (test.test_logging.UnixSocketHandlerTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_logging.py", line 1527, in setUp
    SocketHandlerTest.setUp(self)
  File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_logging.py", line 1442, in setUp
    BaseTest.setUp(self)
  File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_logging.py", line 111, in setUp
    raise AssertionError('Unexpected handlers: %s' % hlist)
AssertionError: Unexpected handlers: [<StreamHandler (NOTSET)>]

This is because when a test fails or when it is skipped, the BaseTest.tearDown() method is not called and as a consequence the following test fails.

----------
nosy: +vinay.sajip

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29177>
_______________________________________


More information about the Python-bugs-list mailing list