array_split.split_test.SplitTest

class array_split.split_test.SplitTest(methodName='runTest')[source]

Tests for array_split.split module.

Methods

__init__([methodName])

Create an instance of the class that will use the named test method when executed.

addClassCleanup(function, /, *args, **kwargs)

Same as addCleanup, except the cleanup items are called even if setUpClass fails (unlike tearDownClass).

addCleanup(function, /, *args, **kwargs)

Add a function, with arguments, to be called when the test is completed.

addTypeEqualityFunc(typeobj, function)

Add a type specific assertEqual style function to compare a type.

assertArraySplitEqual(splt1, splt2)

Compares list of numpy.ndarray results returned by numpy.array_split() and array_split.split.array_split() functions.

countTestCases()

debug()

Run the test without collecting errors in a TestResult

defaultTestResult()

doClassCleanups()

Execute all class cleanup functions.

doCleanups()

Execute all cleanup functions.

id()

run([result])

setUp()

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

setUpClass()

Hook method for setting up class fixture before running tests in the class.

shortDescription()

Returns a one-line description of the test, or None if no description has been provided.

skipTest(reason)

Skip this test.

subTest([msg])

Return a context manager that will return the enclosed block of code in a subtest identified by the optional message and keyword parameters.

tearDown()

Hook method for deconstructing the test fixture after testing it.

tearDownClass()

Hook method for deconstructing the class fixture after running all tests in the class.

test_array_split()

Test for case for array_split.split.array_split().

test_calculate_num_slices_per_axis()

Tests for array_split.split.calculate_num_slices_per_axis().

test_calculate_split_by_tile_max_bytes_1d()

Test for case for splitting with maximum number of tile bytes constraint. For example::.

test_calculate_split_by_tile_shape_1d()

Test for case for splitting by explicit tile shape. For example::.

test_calculate_split_by_tile_shape_2d()

Test for case for splitting by explicit tile shape. For example::.

test_calculate_split_halos_from_extents()

Tests the array_split.split.ShapeSplitter.calculate_split_halos_from_extents() method.

test_calculate_split_with_array_start_1d()

Test for case for splitting with explicit array start multi-index. For example::.

test_calculate_split_with_array_start_2d()

Test for case for splitting with explicit array start multi-index. For example::.

test_calculate_split_with_halo_1d()

Test for case for splitting with explicit halo. For example::.

test_calculate_split_with_halo_2d()

Test for case for splitting with explicit halo. For example::.

test_calculate_split_with_halo_for_empty_tiles()

Tests array_split.shape_split() for case of empty tiles and non-zero halo to ensure halo elements are not added to empty tiles.

test_calculate_tile_shape_for_max_bytes_1d()

Test case for array_split.split.calculate_tile_shape_for_max_bytes(), where array_shape parameter is 1D, i.e. of the form (N,).

test_calculate_tile_shape_for_max_bytes_2d()

Test case for array_split.split.calculate_tile_shape_for_max_bytes(), where array_shape parameter is 2D, i.e. of the form (H,W).

test_convert_halo_to_array_form()

Tests array_split.split.convert_halo_to_array_form().

test_multiple_parameter_groups_error()

Test for case for inconsistent parameter group arguments.

test_pad_with_object()

Tests array_split.split.pad_with_object().

test_properties()

Test array_split.split.ARRAY_BOUNDS and array_split.split.NO_BOUNDS.

test_shape_factors()

Tests for array_split.split.shape_factors().

test_split_by_num_slices_1d()

Test for case for splitting by number of slice elements. For example::.

test_split_by_num_slices_2d_0_axis_elems()

Test for case for splitting by number of slice elements. For example::.

test_split_by_num_slices_2d_non_0_axis_elems()

Test for case for splitting by number of slice elements. For example::.

test_split_by_per_axis_indices()

Test for case for splitting by specified indices. For example::.

Attributes

logger

Class attribute for logging.Logger logging.

longMessage

maxDiff