##// END OF EJS Templates
enable IPython formatter when testing it
Min RK -
Show More
@@ -407,6 +407,9 b' def test_ipython_display_formatter():'
407 def _ipython_display_(self):
407 def _ipython_display_(self):
408 raise NotImplementedError
408 raise NotImplementedError
409
409
410 save_enabled = f.ipython_display_formatter.enabled
411 f.ipython_display_formatter.enabled = True
412
410 yes = SelfDisplaying()
413 yes = SelfDisplaying()
411 no = NotSelfDisplaying()
414 no = NotSelfDisplaying()
412
415
@@ -420,6 +423,9 b' def test_ipython_display_formatter():'
420 nt.assert_equal(md, {})
423 nt.assert_equal(md, {})
421 nt.assert_equal(catcher, [yes])
424 nt.assert_equal(catcher, [yes])
422
425
426 f.ipython_display_formatter.enabled = save_enabled
427
428
423 def test_json_as_string_deprecated():
429 def test_json_as_string_deprecated():
424 class JSONString(object):
430 class JSONString(object):
425 def _repr_json_(self):
431 def _repr_json_(self):
General Comments 0
You need to be logged in to leave comments. Login now