(self)
| 2007 | class ExceptionHandlerTest(SimpleHandlerTestCase): |
| 2008 | class Handler(RequestHandler): |
| 2009 | def get(self): |
| 2010 | exc = self.get_argument("exc") |
| 2011 | if exc == "http": |
| 2012 | raise HTTPError(410, "no longer here") |
| 2013 | elif exc == "zero": |
| 2014 | 1 / 0 |
| 2015 | elif exc == "permission": |
| 2016 | raise PermissionError("not allowed") |
| 2017 | |
| 2018 | def write_error(self, status_code, **kwargs): |
| 2019 | if "exc_info" in kwargs: |
nothing calls this directly
no test coverage detected