Tests

Tests for distributed_trajectories.TM

class tests.test_tm.TestTM[source]

Testing TM

test_normalize_tm()[source]

testing how normalization works

Returns

true/false


Tests for distributed_trajectories.udfs

class tests.test_udfs.TestBasic[source]

Testing UDFs

test_check_central_position_fail()[source]

testing if the filter for the elements works…. Needs better docs…

Returns

True/False

test_check_central_position_pass()[source]

testing if the filter for the elements works…. Needs better docs…

Returns

True/False

test_d1_coords_pure()[source]

transform for 2D to 1D coords

Returns

True/False

test_d1_coords_pure_1()[source]

transform for 2D to 1D coords

Returns

True/False

test_d1_state_vector_1()[source]

testing the transformation to 1D coordinates

Returns

True/False

test_d1_state_vector_2()[source]

testing the transformation to 1D coordinates with width==0

Returns

test_d1_state_vector_3()[source]

testing the transformation to 1D coordinates out of grid

Returns

True/False

test_d2_coords_no_width()[source]

testing 2D coords creation for given width

Returns

True or False

test_d2_coords_width()[source]

testing 2D coords creation for given width

Returns

True or False

test_filter_OD_fail()[source]
Returns

True/False

test_filter_OD_pass()[source]
Returns

True/False

test_middle_interval_x_1()[source]

testing the coordinates for the middle of the interval and the box number middle_interval_for_x(x, A, B, m)

Returns

True/False

test_middle_interval_x_border_case1()[source]

testing the coordinates for the middle of the interval and the box number middle_interval_for_x(x, A, B, m)

Returns

True/False

test_middle_interval_x_border_case2()[source]

testing the coordinates for the middle of the interval and the box number middle_interval_for_x(x, A, B, m)

Returns

True/False


Tests for distributed_trajectories.distributed_trajectories

class tests.test_base.TestsBase[source]

Testing

test_helper_column_set_avg_time_for_cell(mocker)[source]

the sequence of values in the helper column must be a increasing by 1 sequence for each ID and each date.

Parameters

mocker

Returns

true/false

test_set_helper_column(mocker)[source]

checking how helper column is being created. The helper column has the following meaning. Its value increases by 1 as soon as an object leaves the 2D cell.

Parameters

mocker

Returns

false/True