MCPcopy Create free account
hub / github.com/ipython/ipython / test_encourage_iframe_over_html

Function test_encourage_iframe_over_html

IPython/core/tests/test_display.py:233–248  ·  view source on GitHub ↗
(m_warn)

Source from the content-addressed store, hash-verified

231
232@mock.patch('warnings.warn')
233def test_encourage_iframe_over_html(m_warn):
234 display.HTML()
235 m_warn.assert_not_called()
236
237 display.HTML('<br />')
238 m_warn.assert_not_called()
239
240 display.HTML('<html><p>Lots of content here</p><iframe src="http://a.com"></iframe>')
241 m_warn.assert_not_called()
242
243 display.HTML('<iframe src="http://a.com"></iframe>')
244 m_warn.assert_called_with('Consider using IPython.display.IFrame instead')
245
246 m_warn.reset_mock()
247 display.HTML('<IFRAME SRC="http://a.com"></IFRAME>')
248 m_warn.assert_called_with('Consider using IPython.display.IFrame instead')
249
250def test_progress():
251 p = display.ProgressBar(10)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected