Skip to content

Commit

Permalink
Merge pull request #5267 from minrk/normalize-paths
Browse files Browse the repository at this point in the history
normalize unicode in notebook API tests
  • Loading branch information
ellisonbg committed Mar 3, 2014
2 parents b721408 + 87f1c23 commit 2748efa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions IPython/html/services/notebooks/tests/test_notebooks_api.py
Expand Up @@ -108,9 +108,9 @@ class APITest(NotebookTestBase):
]
hidden_dirs = ['.hidden', '__pycache__']

dirs = uniq_stable([d for (d,n) in dirs_nbs])
dirs = uniq_stable([py3compat.cast_unicode(d) for (d,n) in dirs_nbs])
del dirs[0] # remove ''
top_level_dirs = {d.split('/')[0] for d in dirs}
top_level_dirs = {normalize('NFC', d.split('/')[0]) for d in dirs}

def setUp(self):
nbdir = self.notebook_dir.name
Expand Down Expand Up @@ -171,7 +171,7 @@ def test_list_notebooks(self):

def test_list_dirs(self):
dirs = dirs_only(self.nb_api.list().json())
dir_names = {d['name'] for d in dirs}
dir_names = {normalize('NFC', d['name']) for d in dirs}
self.assertEqual(dir_names, self.top_level_dirs) # Excluding hidden dirs

def test_list_nonexistant_dir(self):
Expand Down

0 comments on commit 2748efa

Please sign in to comment.