# nixio.test package

## Subpackages

- nixio.test.xcompat package
  - Submodules
  - nixio.test.xcompat.compile module
    - `ccomp()`
    - `maketests()`
  - Module contents

## Submodules

## nixio.test.test_block module

class nixio.test.test_block.TestBlock(methodName='runTest')

  Bases: `TestCase`

  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_block_data_arrays()
  test_block_definition()
  test_block_eq()
  test_block_find_sources()
  test_block_groups()
  test_block_id()
  test_block_multi_tags()
  test_block_name()
  test_block_sources()
  test_block_tags()
  test_block_timestamps()
  test_block_type()
  test_copy_on_block()

## nixio.test.test_compression module

class nixio.test.test_compression.TestCompression(methodName='runTest')

  Bases: `TestCase`

  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_compress_dataarray()

nixio.test.test_compression.compr_enabled(da)

## nixio.test.test_container module

class nixio.test.test_container.TestContainer(methodName='runTest')

  Bases: `TestCase`

  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_bad_appends()
  test_delete_links_da()
  test_delete_links_multitag()
  test_delete_links_references()
  test_delete_links_section_link()
  test_delete_links_sections()
  test_delete_links_sources()
  test_delete_links_tag()
  test_delete_links_tag_features()
  test_file_references()
  test_index_getter()
  test_link_container_index_getter()
  test_link_container_name_getter()
  test_link_parent_references()
  test_name_getter()
  test_parent_references()

## nixio.test.test_data_array module

class nixio.test.test_data_array.TestDataArray(methodName='runTest')

  Bases: `TestCase`

  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_array_unicode()
  test_data_array_coefficients()
  test_data_array_data()
  test_data_array_definition()
  test_data_array_dimensions()
  test_data_array_dtype()
  test_data_array_eq()
  test_data_array_exp_origin()
  test_data_array_id()
  test_data_array_indexing()
  test_data_array_label()
  test_data_array_multi_slicing()
  test_data_array_name()
  test_data_array_numpy_indexing()
  test_data_array_sources()
  test_data_array_timestamps()
  test_data_array_type()
  test_data_array_unit()
  test_data_deletion()
  test_dim_one_based()
  test_get_slice()
  test_outofbounds_indexing()
  test_single_value_retrieval()
  test_timestamp_autoupdate()
  test_timestamp_noautoupdate()

## nixio.test.test_data_frame module

class nixio.test.test_data_frame.TestDataFrame(methodName='runTest')

  Bases: `TestCase`

  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_append_column()
  test_append_rows()
  test_column_name_collision()
  test_create_with_list()
  test_create_without_dtypes()
  test_data_frame_eq()
  test_data_frame_type()
  test_data_type()
  test_df_shape()
  test_index_column_by_name()
  test_read_cell()
  test_read_column()
  test_read_row()
  test_timestamp_autoupdate()
  test_timestamp_noautoupdate()
  test_unit()
  test_write_cell()
  test_write_column()
  test_write_row()

## nixio.test.test_data_view module

class nixio.test.test_data_view.TestDataView(methodName='runTest')

  Bases: `TestCase`

  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_data_view_ellipsis()
  test_data_view_fancy_slicing()
  test_data_view_oob()
  test_data_view_read()
  test_data_view_read_2d_str_array()
  test_data_view_write_direct()
  test_data_view_write_index()

    Write through DataView to the underlying DataArray using [slice] notation.

    Update copy of underlying data with expected values and compare directly to DataArray for assertions.

## nixio.test.test_dimensions module

class nixio.test.test_dimensions.TestDimension(methodName='runTest')

  Bases: `TestCase`

  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_append_dim_init()
  test_range_dim_ticks_resize()
  test_range_dimension()
  test_range_dimension_modes()
  test_sample_dimension()
  test_sampled_dimension_modes()
  test_set_dim_invalid_labels()
  test_set_dim_label_resize()
  test_set_dim_labels_array()
  test_set_dimension()
  test_set_dimension_modes()

class nixio.test.test_dimensions.TestLinkDimension(methodName='runTest')

  Bases: `TestCase`

  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_data_array_linking_errors()
  test_data_array_range_link_dimension()
  test_data_array_self_link_range_dimension()
  test_data_array_self_link_set_dimension()
  test_data_array_set_link_dimension()
  test_data_frame_linking_errors()
  test_data_frame_range_link_dimension()
  test_data_frame_set_link_dimension()
  test_range_link_tick_replacement()
  test_sampled_dimension_unsupported()
  test_write_linked_array_props()
  test_write_linked_dataframe_props()

## nixio.test.test_feature module

class nixio.test.test_feature.TestFeatures(methodName='runTest')

  Bases: `TestCase`

  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_create_diff_link_type_style()
  test_feature_data()
  test_feature_dataframe()
  test_feature_eq()
  test_feature_id()
  test_feature_link_type()
  test_feature_on_group()
  test_timestamp_autoupdate()
  test_timestamp_noautoupdate()

## nixio.test.test_file module

class nixio.test.test_file.TestFile(methodName='runTest')

  Bases: `TestCase`

  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_context_open()
  test_copy_on_file()
  test_file_blocks()
  test_file_find_sections()
  test_file_format()
  test_file_sections()
  test_file_timestamps()
  test_order_tracking()
  test_timestamp_autoupdate()
  test_timestamp_noautoupdate()

class nixio.test.test_file.TestFileVer(methodName='runTest')

  Bases: `TestCase`

  backend = 'h5py'
  fformat = 'nix'
  filever = (1, 2, 1)
  setUp()

    Hook method for setting up the test fixture before exercising it.

  set_header(fformat=None, version=None, fileid=None)
  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_bad_format()
  test_bad_id()
  test_bad_tuple()
  test_no_open()
  test_read_only()
  test_read_write()
  try_open(mode)

## nixio.test.test_group module

class nixio.test.test_group.TestGroups(methodName='runTest')

  Bases: `TestCase`

  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_group_data_arrays()
  test_group_definition()
  test_group_eq()
  test_group_get_by_name()
  test_group_id()
  test_group_invalid_add()
  test_group_multi_tags()
  test_group_name()
  test_group_tags()
  test_group_timestamps()
  test_group_type()

## nixio.test.test_multi_tag module

class nixio.test.test_multi_tag.TestMultiTags(methodName='runTest')

  Bases: `TestCase`

  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_multi_tag_data_coefficients()
  test_multi_tag_definition()
  test_multi_tag_eq()
  test_multi_tag_extents()
  test_multi_tag_feature_data()
  test_multi_tag_feature_dataframe()
  test_multi_tag_features()
  test_multi_tag_flex()
  test_multi_tag_id()
  test_multi_tag_name()
  test_multi_tag_new_constructor()
  test_multi_tag_positions()
  test_multi_tag_references()
  test_multi_tag_tagged_data()
  test_multi_tag_tagged_data_1d()
  test_multi_tag_tagged_data_slice_mode()
  test_multi_tag_timestamps()
  test_multi_tag_type()
  test_multi_tag_units()
  test_tagged_range_dim()

    Simple test where the slice can be calculated directly from the position and extent and compared to the original data. Range dimension slicing.

  test_tagged_sampled_dim()

    Simple test where the slice can be calculated directly from the position and extent and compared to the original data. Sampled dimension slicing.

  test_tagged_set_dim()

    Simple test where the slice can be calculated directly from the position and extent and compared to the original data. Set dimension slicing.

  test_timestamp_autoupdate()
  test_timestamp_noautoupdate()

## nixio.test.test_nix_compatibility module

nixio.test.test_nix_compatibility.check_block_children_counts(block, ngrp, nda, ntg, nmt)

nixio.test.test_nix_compatibility.check_group_children_counts(group, nda, ntg, nmt)

nixio.test.test_nix_compatibility.compare(expected, actual)

nixio.test.test_nix_compatibility.runcpp(*cmdargs)

nixio.test.test_nix_compatibility.test_blocks(tmpdir, bindir)

nixio.test.test_nix_compatibility.test_data_arrays(tmpdir, bindir)

nixio.test.test_nix_compatibility.test_data_frames(tmpdir, bindir)

nixio.test.test_nix_compatibility.test_full_file_read(tmpdir, bindir)

nixio.test.test_nix_compatibility.test_full_file_write(tmpdir, bindir)

nixio.test.test_nix_compatibility.test_full_write(tmpdir)

nixio.test.test_nix_compatibility.test_groups(tmpdir, bindir)

nixio.test.test_nix_compatibility.test_multi_tag_features(tmpdir)

nixio.test.test_nix_compatibility.test_multi_tag_references(tmpdir)

nixio.test.test_nix_compatibility.test_multi_tags(tmpdir, bindir)

nixio.test.test_nix_compatibility.test_properties(tmpdir)

nixio.test.test_nix_compatibility.test_sections(tmpdir)

nixio.test.test_nix_compatibility.test_tags(tmpdir, bindir)

nixio.test.test_nix_compatibility.validate(fname)

  Runs the nix validation function on the given file.

## nixio.test.test_property module

class nixio.test.test_property.TestProperties(methodName='runTest')

  Bases: `TestCase`

  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_empties()
  test_extend_values()
  test_property_definition()
  test_property_dependency()
  test_property_dependency_value()
  test_property_eq()
  test_property_id()
  test_property_name()
  test_property_reference()
  test_property_uncertainty()
  test_property_unit()
  test_property_value_origin()
  test_property_values()
  test_unicode_values()

## nixio.test.test_section module

class nixio.test.test_section.TestSections(methodName='runTest')

  Bases: `TestCase`

  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_copy_on_sections()
  test_inverse_search()
  test_parent()
  test_property_reference()
  test_section_definition()
  test_section_eq()
  test_section_find_sections()
  test_section_id()
  test_section_link()
  test_section_name()
  test_section_properties()
  test_section_repository()
  test_section_sections()
  test_section_type()
  test_timestamp_autoupdate()
  test_timestamp_noautoupdate()

## nixio.test.test_source module

class nixio.test.test_source.TestSources(methodName='runTest')

  Bases: `TestCase`

  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_deep_linking()
  test_inverse_search()
  test_parent_source()
  test_referring_objects()
  test_source_definition()
  test_source_eq()
  test_source_find_sources()
  test_source_id()
  test_source_name()
  test_source_sources()
  test_source_timestamps()
  test_source_type()
  test_sources_extend()

## nixio.test.test_tag module

class nixio.test.test_tag.TestTags(methodName='runTest')

  Bases: `TestCase`

  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_flex()
  test_tag_definition()
  test_tag_eq()
  test_tag_extent()
  test_tag_feature_data()
  test_tag_feature_dataframe()
  test_tag_features()
  test_tag_id()
  test_tag_name()
  test_tag_position()
  test_tag_references()
  test_tag_tagged_data()
  test_tag_tagged_data_slice_mode()
  test_tag_timestamps()
  test_tag_type()
  test_tag_units()
  test_tagged_range_dim()

    Simple test where the slice can be calculated directly from the position and extent and compared to the original data. Range dimension slicing.

  test_tagged_sampled_dim()

    Simple test where the slice can be calculated directly from the position and extent and compared to the original data. Sampled dimension slicing.

  test_tagged_set_dim()

    Simple test where the slice can be calculated directly from the position and extent and compared to the original data. Set dimension slicing.

  test_timestamp_autoupdate()
  test_timestamp_noautoupdate()

## nixio.test.test_util module

class nixio.test.test_util.TestUtil(methodName='runTest')

  Bases: `TestCase`

  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_name_check()
  test_name_sanitizer()
  test_unit_is_atomic()
  test_unit_is_compound()
  test_unit_is_si()
  test_unit_sanitizer()
  test_unit_scalable()
  test_unit_scaling()
  test_unit_split()
  test_unit_split_compound()

## nixio.test.test_validator module

class nixio.test.test_validator.TestValidate(methodName='runTest')

  Bases: `TestCase`

  static print_all_results(res)
  setUp()

    Hook method for setting up the test fixture before exercising it.

  tearDown()

    Hook method for deconstructing the test fixture after testing it.

  test_all_valid()
  test_check_block()
  test_check_data_array_bad_dims()
  test_check_data_array_coefficients()
  test_check_data_array_invalid_unit()
  test_check_data_array_wrong_labels()
  test_check_data_array_wrong_ticks()
  test_check_file()
  test_check_group()
  test_check_multi_tag_invalid_unit()
  test_check_multi_tag_mismatch_dim()
  test_check_multi_tag_mismatch_units()
  test_check_multi_tag_no_pos()
  test_check_multi_tag_pos_ext_mismatch()
  test_check_property()
  test_check_range_dim_invalid_unit()
  test_check_range_dim_no_ticks()
  test_check_range_dim_unsorted_ticks()
  test_check_sampled_dim_bad_interval()
  test_check_sampled_dim_bad_unit()
  test_check_sampled_dim_no_interval()
  test_check_sampled_dim_no_unit()
  test_check_section()
  test_check_source()
  test_check_tag_invalid_unit()
  test_check_tag_mismatch_dim()
  test_check_tag_mismatch_units()
  test_check_tag_no_pos()
  test_check_tag_pos_ext_mismatch()
  test_incorrect_dim_index()
  test_invalid_dim_index()

## nixio.test.tmp module

class nixio.test.tmp.TempDir(prefix=None)

  Bases: `object`

  cleanup()

## Module contents