##// END OF EJS Templates
Merge pull request #4868 from juliantaylor/static-path-fixes...
Min RK -
r14752:d5868c13 merge
parent child Browse files
Show More
@@ -48,7 +48,10 b' def test_image_filename_defaults():'
48 nt.assert_raises(ValueError, display.Image)
48 nt.assert_raises(ValueError, display.Image)
49 nt.assert_raises(ValueError, display.Image, data='this is not an image', format='badformat', embed=True)
49 nt.assert_raises(ValueError, display.Image, data='this is not an image', format='badformat', embed=True)
50 from IPython.html import DEFAULT_STATIC_FILES_PATH
50 from IPython.html import DEFAULT_STATIC_FILES_PATH
51 imgfile = os.path.join(DEFAULT_STATIC_FILES_PATH, 'base/images/ipynblogo.png')
51 # check boths paths to allow packages to test at build and install time
52 imgfile = os.path.join(tpath, 'html/static/base/images/ipynblogo.png')
53 if not os.path.exists(imgfile):
54 imgfile = os.path.join(DEFAULT_STATIC_FILES_PATH, 'base/images/ipynblogo.png')
52 img = display.Image(filename=imgfile)
55 img = display.Image(filename=imgfile)
53 nt.assert_equal('png', img.format)
56 nt.assert_equal('png', img.format)
54 nt.assert_is_not_none(img._repr_png_())
57 nt.assert_is_not_none(img._repr_png_())
@@ -87,8 +87,9 b' class CSSHTMLHeaderPreprocessor(Preprocessor):'
87 header = []
87 header = []
88
88
89 #Construct path to IPy CSS
89 #Construct path to IPy CSS
90 sheet_filename = os.path.join(path.get_ipython_package_dir(),
90 from IPython.html import DEFAULT_STATIC_FILES_PATH
91 'html', 'static', 'style', 'style.min.css')
91 sheet_filename = os.path.join(DEFAULT_STATIC_FILES_PATH,
92 'style', 'style.min.css')
92
93
93 #Load style CSS file.
94 #Load style CSS file.
94 with io.open(sheet_filename, encoding='utf-8') as file:
95 with io.open(sheet_filename, encoding='utf-8') as file:
General Comments 0
You need to be logged in to leave comments. Login now