hospital-wsgi: TypeError: addSkip() takes exactly 2 arguments (3 given)
benoitbryon opened this issue · 1 comments
benoitbryon commented
If healthchecks use unittest's "skip" feature and healthchecks are served using WSGI, then we get a Python exception like TypeError: addSkip() takes exactly 2 arguments (3 given)
.
benoitbryon commented
The reason is:
unittest.TestResult.addSkip()
requirestest
andreason
arguments: https://docs.python.org/2.7/library/unittest.html#unittest.TestResult.addSkip- whereas as of version 0.8.1
hospital.wsgi.TestResult.addSkip()
only hastest
argument (reason
is missing): https://github.com/python-hospital/hospital/blob/0.8.1/hospital/wsgi.py#L45
=> hospital.wsgi.TestResult.addSkip()
must require both test
and reason
arguments.