Exemplo n.º 1
0
 def test_dfs_present(self):
     '''
     Test for Check if a file or directory is present on the distributed FS.
     '''
     with patch.object(hadoop, '_hadoop_cmd',
                       side_effect=['No such file or directory', 'A']):
         self.assertFalse(hadoop.dfs_present('path'))
         self.assertTrue(hadoop.dfs_present('path'))
Exemplo n.º 2
0
 def test_dfs_present(self):
     '''
     Test for Check if a file or directory is present on the distributed FS.
     '''
     with patch.object(hadoop,
                       '_hadoop_cmd',
                       side_effect=['No such file or directory', 'A']):
         self.assertFalse(hadoop.dfs_present('path'))
         self.assertTrue(hadoop.dfs_present('path'))
Exemplo n.º 3
0
 def test_dfs_present(self):
     """
     Test for Check if a file or directory is present on the distributed FS.
     """
     with patch.object(hadoop,
                       "_hadoop_cmd",
                       side_effect=["No such file or directory", "A"]):
         self.assertFalse(hadoop.dfs_present("path"))
         self.assertTrue(hadoop.dfs_present("path"))