##// END OF EJS Templates
test formatter raising NotImplementedError
MinRK -
Show More
@@ -244,6 +244,18 b' def test_warn_error_method():'
244 nt.assert_in("text/html", captured.stderr)
244 nt.assert_in("text/html", captured.stderr)
245 nt.assert_in("zero", captured.stderr)
245 nt.assert_in("zero", captured.stderr)
246
246
247 def test_nowarn_notimplemented():
248 f = HTMLFormatter()
249 class HTMLNotImplemented(object):
250 def _repr_html_(self):
251 raise NotImplementedError
252 return 1/0
253 h = HTMLNotImplemented()
254 with capture_output() as captured:
255 result = f(h)
256 nt.assert_is(result, None)
257 nt.assert_not_in("WARNING", captured.stderr)
258
247 def test_warn_error_for_type():
259 def test_warn_error_for_type():
248 f = HTMLFormatter()
260 f = HTMLFormatter()
249 f.for_type(int, lambda i: name_error)
261 f.for_type(int, lambda i: name_error)
General Comments 0
You need to be logged in to leave comments. Login now