Skip to content

Commit

Permalink
Fix tests to handle paths in Windows. NormalizePath works properly bu…
Browse files Browse the repository at this point in the history
…t the tests would still fail because NormalizePath would NOT work as the test results expected.
  • Loading branch information
JPeterMugaas committed Nov 4, 2020
1 parent a1b1f7c commit 8dcb757
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion testsuite/test_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_check_simple(self):
self.assertFalse(stderr)
self.assertEqual(len(stdout), 24)
for line, num, col in zip(stdout, (3, 6, 6, 9, 12), (3, 6, 6, 1, 5)):
path, x, y, msg = line.split(':')
path, x, y, msg = line.rsplit(':', 3)
self.assertTrue(path.endswith(E11))
self.assertEqual(x, str(num))
self.assertEqual(y, str(col))
Expand Down
2 changes: 1 addition & 1 deletion testsuite/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ def test_normalize_paths(self):
self.assertEqual(normalize_paths('foo,bar'), ['foo', 'bar'])
self.assertEqual(normalize_paths('foo, bar '), ['foo', 'bar'])
self.assertEqual(normalize_paths('/foo/bar,baz/../bat'),
['/foo/bar', cwd + '/bat'])
[os.path.realpath('/foo/bar'), cwd + '/bat'])
self.assertEqual(normalize_paths(".pyc,\n build/*"),
['.pyc', cwd + '/build/*'])

0 comments on commit 8dcb757

Please sign in to comment.