diff --git a/IPython/core/tests/test_display.py b/IPython/core/tests/test_display.py
index 15cae21..b88bee8 100644
--- a/IPython/core/tests/test_display.py
+++ b/IPython/core/tests/test_display.py
@@ -7,7 +7,7 @@ import warnings
from unittest import mock
-import nose.tools as nt
+import pytest
from IPython import display
from IPython.core.getipython import get_ipython
@@ -22,15 +22,15 @@ def test_image_size():
"""Simple test for display.Image(args, width=x,height=y)"""
thisurl = 'http://www.google.fr/images/srpr/logo3w.png'
img = display.Image(url=thisurl, width=200, height=200)
- nt.assert_equal(u'' % (thisurl), img._repr_html_())
+ assert '' % (thisurl) == img._repr_html_()
img = display.Image(url=thisurl, metadata={'width':200, 'height':200})
- nt.assert_equal(u'' % (thisurl), img._repr_html_())
+ assert '' % (thisurl) == img._repr_html_()
img = display.Image(url=thisurl, width=200)
- nt.assert_equal(u'' % (thisurl), img._repr_html_())
+ assert '' % (thisurl) == img._repr_html_()
img = display.Image(url=thisurl)
- nt.assert_equal(u'' % (thisurl), img._repr_html_())
+ assert '' % (thisurl) == img._repr_html_()
img = display.Image(url=thisurl, unconfined=True)
- nt.assert_equal(u'' % (thisurl), img._repr_html_())
+ assert '' % (thisurl) == img._repr_html_()
def test_image_mimes():
@@ -39,7 +39,7 @@ def test_image_mimes():
mime = display.Image._MIMETYPES[format]
img = display.Image(b'garbage', format=format)
data, metadata = fmt(img)
- nt.assert_equal(sorted(data), sorted([mime, 'text/plain']))
+ assert sorted(data) == sorted([mime, "text/plain"])
def test_geojson():
@@ -60,17 +60,20 @@ def test_geojson():
"attribution": "Celestia/praesepe",
"minZoom": 0,
"maxZoom": 18,
- })
- nt.assert_equal(u'', str(gj))
+ },
+ )
+ assert "" == str(gj)
+
def test_retina_png():
here = os.path.dirname(__file__)
img = display.Image(os.path.join(here, "2x2.png"), retina=True)
- nt.assert_equal(img.height, 1)
- nt.assert_equal(img.width, 1)
+ assert img.height == 1
+ assert img.width == 1
data, md = img._repr_png_()
- nt.assert_equal(md['width'], 1)
- nt.assert_equal(md['height'], 1)
+ assert md["width"] == 1
+ assert md["height"] == 1
+
def test_embed_svg_url():
import gzip
@@ -102,18 +105,20 @@ def test_embed_svg_url():
with mock.patch('urllib.request.urlopen', side_effect=mocked_urlopen):
svg = display.SVG(url=url)
- nt.assert_true(svg._repr_svg_().startswith('