mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-15 04:00:34 +08:00
Replace backslash with slash
This commit is contained in:
parent
36d5131a4b
commit
84f1f6fc3d
@ -755,7 +755,7 @@ class NotebookApp(JupyterApp):
|
||||
return py3compat.getcwd()
|
||||
|
||||
def _notebook_dir_validate(self, value, trait):
|
||||
# Strip any trailing backslashes
|
||||
# Strip any trailing slashes
|
||||
value = value.rstrip(os.sep)
|
||||
|
||||
if not os.path.isabs(value):
|
||||
|
@ -62,8 +62,8 @@ def test_invalid_nb_dir():
|
||||
with nt.assert_raises(TraitError):
|
||||
app.notebook_dir = tf
|
||||
|
||||
def test_nb_dir_with_backslash():
|
||||
with TemporaryDirectory(suffix="_backslash/") as td:
|
||||
def test_nb_dir_with_slash():
|
||||
with TemporaryDirectory(suffix="_slash/") as td:
|
||||
app = NotebookApp(notebook_dir=td)
|
||||
nt.assert_false(app.notebook_dir.endswith("/"))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user