crikit.io.lazy5.tests package — CRIKit2 0.4.3 documentation

# crikit.io.lazy5.tests package

## Submodules

## crikit.io.lazy5.tests.test_alter module

Test inspection of HDF5 files

crikit.io.lazy5.tests.test_alter.hdf_dataset()

  Setups and tears down a sample HDF5 file

crikit.io.lazy5.tests.test_alter.test_attr_alter(hdf_dataset)

  Try altering an attribute with the same or different type of value

crikit.io.lazy5.tests.test_alter.test_attr_alter_same(hdf_dataset)

  Try altering an attribute with the same type of value type

crikit.io.lazy5.tests.test_alter.test_write_attr_dict(hdf_dataset)

  Try writing dictionary of attributes

## crikit.io.lazy5.tests.test_create module

Test creation of HDF5 files

crikit.io.lazy5.tests.test_create.test_save_diff_path()

crikit.io.lazy5.tests.test_create.test_save_no_attrs()

crikit.io.lazy5.tests.test_create.test_save_to_open_h5_file()

  Test saving to an H5 file where the H5 file id is passed

crikit.io.lazy5.tests.test_create.test_save_to_open_wrong_type()

  Test saving to an inappripriate input (not string or h5 file fid)

## crikit.io.lazy5.tests.test_inspect module

Test inspection of HDF5 files

crikit.io.lazy5.tests.test_inspect.hdf_dataset()

  Setups and tears down a sample HDF5 file

crikit.io.lazy5.tests.test_inspect.test_get_datasets_fullpath(hdf_dataset)

  Get an HDF5 file’s dataset list with groupnames prepended

crikit.io.lazy5.tests.test_inspect.test_get_datasets_nopath(hdf_dataset)

  Get an HDF5 file’s dataset list with no groupnames prepended

crikit.io.lazy5.tests.test_inspect.test_get_dset_attrs(hdf_dataset)

  Get an HDF5 file’s dataset list with groupnames prepended

crikit.io.lazy5.tests.test_inspect.test_get_groups(hdf_dataset)

  Get an HDF5 file’s group list

crikit.io.lazy5.tests.test_inspect.test_get_hierarchy_fullpath(hdf_dataset)

  OrderedDict describing HDF5 file hierarchy. Testing with full paths in the dataset names. Keys are groups, values are datasets.

crikit.io.lazy5.tests.test_inspect.test_get_hierarchy_grp_w_dset(hdf_dataset)

  OrderedDict describing HDF5 file hierarchy. Testing empty sets are NOT returned. Keys are groups, values are datasets.

crikit.io.lazy5.tests.test_inspect.test_get_hierarchy_nopath(hdf_dataset)

  OrderedDict describing HDF5 file hierarchy. Testing with no full paths in the dataset names. Keys are groups, values are datasets.

crikit.io.lazy5.tests.test_inspect.test_valid_dsets(hdf_dataset)

  Test whether a dset or list of dsets are valid or not

crikit.io.lazy5.tests.test_inspect.test_valid_file(hdf_dataset)

  Test whether a file is valid or not

## crikit.io.lazy5.tests.test_nonh5utils module

Test non-HDF-related utilities

crikit.io.lazy5.tests.test_nonh5utils.test_check_type_compat()

  Test check_type_compat[ibility]

crikit.io.lazy5.tests.test_nonh5utils.test_filter_list()

  Test filtering of lists

crikit.io.lazy5.tests.test_nonh5utils.test_return_family_type()

  Test return_family_type

## crikit.io.lazy5.tests.test_ui module

Test inspection of HDF5 files

class crikit.io.lazy5.tests.test_ui.TestUI

  Bases: `object`

  Test the HDF5 PyQt5 Viewer

  hdf_dataset()

    Setups and tears down a sample HDF5 file

  pytestmark = [Mark(name='skipif', args=(False,), kwargs={'reason': 'PyQt5 not installed, skipping.'})]
  test_ui_attrs(hdf_dataset)

    Load test file, change to base group (/), check attributes

  test_ui_change_grp_and_filter_exclude(hdf_dataset)

    Load test file, change to Group1, filter for _1

  test_ui_change_grp_and_filter_include(hdf_dataset)

    Load test file, change to Group1, filter for _1

  test_ui_load_file(hdf_dataset)

    Load test file and check groups

  test_ui_win_title_empty_load_dataset(hdf_dataset)

    Test whether load dataset dialog is titled properly with no title provided

  test_ui_win_title_load_dataset(hdf_dataset)

    Test whether load dataset dialog is titled properly

  test_ui_wrongfile(hdf_dataset)

    Load test file, change to base group (/), check attributes

## crikit.io.lazy5.tests.test_utils module

Test HDF-related utilities

crikit.io.lazy5.tests.test_utils.hdf_dataset()

  Setups and tears down a sample HDF5 file

crikit.io.lazy5.tests.test_utils.test_fid_or_file_close_if_not_fid(hdf_dataset)

  Test close if filename was provided

crikit.io.lazy5.tests.test_utils.test_fid_or_file_fid_provided(hdf_dataset)

  Test FidOrFile Class with provided fid

crikit.io.lazy5.tests.test_utils.test_fid_or_file_filename_provided(hdf_dataset)

  Test FidOrFile Class with provided filename

crikit.io.lazy5.tests.test_utils.test_fullpath()

  Test full path

crikit.io.lazy5.tests.test_utils.test_hdf_is_open(hdf_dataset)

  Test hdf_is_open function

## Module contents