示例#1
0
    def testLsHdf(self):
        '''
        Creates 1..n files depending upon the number of arkouda_server locales, invokes the 
        ls_hdf method on an explicit file name reads the files and confirms the expected 
        message was returned.

        :return: None
        :raise: AssertionError if the h5ls output does not match expected value
        '''
        self._create_file(columns=self.dict_single_column,
                          prefix_path='{}/iotest_single_column'.format(
                              IOTest.io_test_dir))
        message = ak.ls_hdf('{}/iotest_single_column_LOCALE0000'.format(
            IOTest.io_test_dir))
        self.assertIn('int_tens_pdarray', message)

        with self.assertRaises(RuntimeError) as cm:
            ak.ls_hdf('{}/not-a-file_LOCALE0000'.format(IOTest.io_test_dir))
        self.assertIn('is not an HDF5 file', cm.exception.args[0])
示例#2
0
    def testLsHdf(self):
        '''
        Creates 1..n files depending upon the number of arkouda_server locales, invokes the 
        ls_hdf method on an explicit file name reads the files and confirms the expected 
        message was returned.

        :return: None
        :raise: AssertionError if the h5ls output does not match expected value
        '''
        self._create_file(columns=self.dict_single_column,
                          path_prefix='/tmp/iotest_single_column')
        message = ak.ls_hdf('/tmp/iotest_single_column_LOCALE0')
        self.assertIn('int_tens_pdarray         Dataset', message)
示例#3
0
    def testLsHdfEmpty(self):
        # Test filename empty/whitespace-only condition
        with self.assertRaises(ValueError):
            ak.ls_hdf("")

        with self.assertRaises(ValueError):
            ak.ls_hdf("   ")

        with self.assertRaises(ValueError):
            ak.ls_hdf(" \n\r\t  ")