Show More
|
1 | NO CONTENT: new file 100644, binary diff hidden |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
@@ -22,6 +22,24 b' def test_image_size():' | |||
|
22 | 22 | img = display.Image(url=thisurl) |
|
23 | 23 | nt.assert_equal(u'<img src="%s"/>' % (thisurl), img._repr_html_()) |
|
24 | 24 | |
|
25 | def test_retina_png(): | |
|
26 | here = os.path.dirname(__file__) | |
|
27 | img = display.Image(os.path.join(here, "2x2.png"), retina=True) | |
|
28 | nt.assert_equal(img.height, 1) | |
|
29 | nt.assert_equal(img.width, 1) | |
|
30 | data, md = img._repr_png_() | |
|
31 | nt.assert_equal(md['width'], 1) | |
|
32 | nt.assert_equal(md['height'], 1) | |
|
33 | ||
|
34 | def test_retina_jpeg(): | |
|
35 | here = os.path.dirname(__file__) | |
|
36 | img = display.Image(os.path.join(here, "2x2.jpg"), retina=True) | |
|
37 | nt.assert_equal(img.height, 1) | |
|
38 | nt.assert_equal(img.width, 1) | |
|
39 | data, md = img._repr_jpeg_() | |
|
40 | nt.assert_equal(md['width'], 1) | |
|
41 | nt.assert_equal(md['height'], 1) | |
|
42 | ||
|
25 | 43 | def test_image_filename_defaults(): |
|
26 | 44 | '''test format constraint, and validity of jpeg and png''' |
|
27 | 45 | tpath = ipath.get_ipython_package_dir() |
General Comments 0
You need to be logged in to leave comments.
Login now