Skip to content

Commit 8dcb757

Browse files
committed
Fix tests to handle paths in Windows. NormalizePath works properly but the tests would still fail because NormalizePath would NOT work as the test results expected.
1 parent a1b1f7c commit 8dcb757

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

testsuite/test_shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def test_check_simple(self):
7979
self.assertFalse(stderr)
8080
self.assertEqual(len(stdout), 24)
8181
for line, num, col in zip(stdout, (3, 6, 6, 9, 12), (3, 6, 6, 1, 5)):
82-
path, x, y, msg = line.split(':')
82+
path, x, y, msg = line.rsplit(':', 3)
8383
self.assertTrue(path.endswith(E11))
8484
self.assertEqual(x, str(num))
8585
self.assertEqual(y, str(col))

testsuite/test_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ def test_normalize_paths(self):
1818
self.assertEqual(normalize_paths('foo,bar'), ['foo', 'bar'])
1919
self.assertEqual(normalize_paths('foo, bar '), ['foo', 'bar'])
2020
self.assertEqual(normalize_paths('/foo/bar,baz/../bat'),
21-
['/foo/bar', cwd + '/bat'])
21+
[os.path.realpath('/foo/bar'), cwd + '/bat'])
2222
self.assertEqual(normalize_paths(".pyc,\n build/*"),
2323
['.pyc', cwd + '/build/*'])

0 commit comments

Comments
 (0)