Skip to content
Browse files

Merge pull request #596 from sudarshang/595_fix_failing_fs_test_cases

Fixes 595 (fix failing fs test cases)
  • Loading branch information...
2 parents 0c7107d + 35521ca commit f7b3b9ad8b0033808de3695387fe649bb532da3b @sudarshang sudarshang committed Jan 25, 2013
Showing with 9 additions and 9 deletions.
  1. +5 −5 tests/fs/test_hadoop.py
  2. +2 −2 tests/fs/test_local.py
  3. +2 −2 tests/fs/test_ssh.py
View
10 tests/fs/test_hadoop.py
@@ -61,27 +61,27 @@ def test_ls_basic(self):
def test_ls_basic_2(self):
self.make_mock_file('f')
self.make_mock_file('f2')
- self.assertEqual(list(self.fs.ls('hdfs:///')), ['hdfs:///f',
+ self.assertItemsEqual(list(self.fs.ls('hdfs:///')), ['hdfs:///f',
'hdfs:///f2'])
def test_ls_recurse(self):
self.make_mock_file('f')
self.make_mock_file('d/f2')
- self.assertEqual(list(self.fs.ls('hdfs:///')),
+ self.assertItemsEqual(list(self.fs.ls('hdfs:///')),
['hdfs:///f', 'hdfs:///d/f2'])
def test_ls_s3n(self):
# hadoop fs -lsr doesn't have user and group info when reading from s3
self.make_mock_file('f')
- self.assertEqual(list(self.fs.ls('s3n://bucket/')),
+ self.assertItemsEqual(list(self.fs.ls('s3n://bucket/')),
['s3n://bucket/f'])
def test_single_space(self):
self.make_mock_file('foo bar')
- self.assertEqual(list(self.fs.ls('hdfs:///')), ['hdfs:///foo bar'])
+ self.assertItemsEqual(list(self.fs.ls('hdfs:///')), ['hdfs:///foo bar'])
def test_double_space(self):
self.make_mock_file('foo bar')
- self.assertEqual(list(self.fs.ls('hdfs:///')), ['hdfs:///foo bar'])
+ self.assertItemsEqual(list(self.fs.ls('hdfs:///')), ['hdfs:///foo bar'])
def test_cat_uncompressed(self):
# mockhadoop doesn't support compressed files, so we won't test for it.
View
4 tests/fs/test_local.py
@@ -54,13 +54,13 @@ def test_ls_basic(self):
def test_ls_basic_2(self):
self.makefile('f', 'contents')
self.makefile('f2', 'contents')
- self.assertEqual(list(self.fs.ls(self.tmp_dir)),
+ self.assertItemsEqual(list(self.fs.ls(self.tmp_dir)),
self.abs_paths('f', 'f2'))
def test_ls_recurse(self):
self.makefile('f', 'contents')
self.makefile('d/f2', 'contents')
- self.assertEqual(list(self.fs.ls(self.tmp_dir)),
+ self.assertItemsEqual(list(self.fs.ls(self.tmp_dir)),
self.abs_paths('f', 'd/f2'))
def test_cat_uncompressed(self):
View
4 tests/fs/test_ssh.py
@@ -66,13 +66,13 @@ def test_ls_basic(self):
def test_ls_basic_2(self):
self.make_master_file('f', 'contents')
self.make_master_file('f2', 'contents')
- self.assertEqual(list(self.fs.ls('ssh://testmaster/')),
+ self.assertItemsEqual(list(self.fs.ls('ssh://testmaster/')),
['ssh://testmaster/f', 'ssh://testmaster/f2'])
def test_ls_recurse(self):
self.make_master_file('f', 'contents')
self.make_master_file('d/f2', 'contents')
- self.assertEqual(list(self.fs.ls('ssh://testmaster/')),
+ self.assertItemsEqual(list(self.fs.ls('ssh://testmaster/')),
['ssh://testmaster/f', 'ssh://testmaster/d/f2'])
def test_cat_uncompressed(self):

0 comments on commit f7b3b9a

Please sign in to comment.
Something went wrong with that request. Please try again.