##// END OF EJS Templates
test check_nbextension
MinRK -
Show More
@@ -24,7 +24,7 b' import IPython.testing.tools as tt'
24 from IPython.utils import py3compat
24 from IPython.utils import py3compat
25 from IPython.utils.tempdir import TemporaryDirectory
25 from IPython.utils.tempdir import TemporaryDirectory
26 from IPython.html import nbextensions
26 from IPython.html import nbextensions
27 from IPython.html.nbextensions import install_nbextension
27 from IPython.html.nbextensions import install_nbextension, check_nbextension
28
28
29 #-----------------------------------------------------------------------------
29 #-----------------------------------------------------------------------------
30 # Test functions
30 # Test functions
@@ -232,3 +232,15 b' class TestInstallNBExtension(TestCase):'
232 self.assert_installed("bar.js")
232 self.assert_installed("bar.js")
233 finally:
233 finally:
234 nbextensions.urlretrieve = save_urlretrieve
234 nbextensions.urlretrieve = save_urlretrieve
235
236 def test_check_nbextension(self):
237 with TemporaryDirectory() as d:
238 f = u'ƒ.js'
239 src = pjoin(d, f)
240 touch(src)
241 install_nbextension(src)
242
243 assert check_nbextension(f, self.ipdir)
244 assert check_nbextension([f], self.ipdir)
245 assert not check_nbextension([f, pjoin('dne', f)], self.ipdir)
246
General Comments 0
You need to be logged in to leave comments. Login now