fix and tests for the issue related with the trailing slash using 'nbextension install' (see #2069)

kikocorreoso 9 years ago
parent ba7e7186cf
commit 97263161e4

@ -165,7 +165,7 @@ def install_nbextension(path, overwrite=False, symlink=False,
full_dest = None
else:
if not destination:
destination = basename(path)
destination = basename(normpath(path))
destination = cast_unicode_py2(destination)
full_dest = normpath(pjoin(nbext, destination))
if overwrite and os.path.lexists(full_dest):

@ -178,6 +178,11 @@ class TestInstallNBExtension(TestCase):
install_nbextension(pjoin(self.src, d))
self.assert_installed(self.files[-1])
def test_single_dir_trailing_slash(self):
d = [u'∂ir/', u'∂ir\\']
for dest in d:
install_nbextension(pjoin(self.src, dest))
self.assert_installed(self.files[-1])
def test_destination_file(self):
file = self.files[0]

Loading…
Cancel
Save