diff --git a/IPython/core/tests/2x2.jpg b/IPython/core/tests/2x2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3d176625fc53435042273e971c42a0daf855aaf3 GIT binary patch literal 331 zc%1ux^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<Jp%s%2(oVqs=wWnlrz)&k`jSOi&x6b&8O zgaZ@Vl?p|S8YeE~Pwh=DOELf4NWZ*Q!{f5ODks=S2uSL zPp{yR(6I1`$f)F$)U@=B%&g*)(z5c3%Btp;*0%PJ&aO$5r%atTea6gLixw|gx@`H1 zm8&*w-m-Pu_8mKS9XfpE=&|D`PM*4S`O4L6*Kgds_3+W-Cr_U}fAR9w$4{TXeEs(Q T$IoB?Z!vIy{A16c{r@HaOTTFm literal 0 Hc$@' % (thisurl), img._repr_html_()) +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) + data, md = img._repr_png_() + nt.assert_equal(md['width'], 1) + nt.assert_equal(md['height'], 1) + +def test_retina_jpeg(): + here = os.path.dirname(__file__) + img = display.Image(os.path.join(here, "2x2.jpg"), retina=True) + nt.assert_equal(img.height, 1) + nt.assert_equal(img.width, 1) + data, md = img._repr_jpeg_() + nt.assert_equal(md['width'], 1) + nt.assert_equal(md['height'], 1) + def test_image_filename_defaults(): '''test format constraint, and validity of jpeg and png''' tpath = ipath.get_ipython_package_dir()