From 88f0b3d045a06e3de97bbd55d7c9c46308a1eafa 2014-01-29 00:15:11 From: Thomas Kluyver Date: 2014-01-29 00:15:11 Subject: [PATCH] Partially normalise paths for Windows tests --- diff --git a/IPython/core/tests/test_completerlib.py b/IPython/core/tests/test_completerlib.py index 7c55393..494bdb2 100644 --- a/IPython/core/tests/test_completerlib.py +++ b/IPython/core/tests/test_completerlib.py @@ -82,8 +82,11 @@ class Test_magic_run_completer(unittest.TestCase): event = MockEvent(u'%run a.py {}'.format(join(self.BASETESTDIR, 'a'))) print(repr(event.line)) match = set(magic_run_completer(None, event)) - self.assertEqual(match, {join(self.BASETESTDIR, f) for - f in (u'a.py', u'aao.py', u'aao.txt', u'adir/')}) + # We specifically use replace here rather than normpath, because + # at one point there were duplicates 'adir' and 'adir/', and normpath + # would hide the failure for that. + self.assertEqual(match, {join(self.BASETESTDIR, f).replace('\\','/') + for f in (u'a.py', u'aao.py', u'aao.txt', u'adir/')}) class Test_magic_run_completer_nonascii(unittest.TestCase): @onlyif_unicode_paths