pyspread.model.test package

Submodules

pyspread.model.test.test_model module

test_model

Unit tests for model.py

class pyspread.model.test.test_model.Settings[source]

Bases: object

Simulates settings class

timeout = 1000
class pyspread.model.test.test_model.TestCellAttributes[source]

Bases: object

Unit tests for CellAttributes

setup_method(method)[source]

Creates empty CellAttributes

test_append()[source]

Test append

test_for_table()[source]

Test for_table

test_get_merging_cell()[source]

Test get_merging_cell

test_getitem()[source]

Test __getitem__

test_len_table_cache()[source]

Test _len_table_cache

test_setitem()[source]

Test __setitem__

test_update_table_cache()[source]

Test _update_table_cache

class pyspread.model.test.test_model.TestCodeArray[source]

Bases: object

Unit tests for CodeArray

data_eval_cell = [((0, 0, 0), '2 + 4', 6), ((1, 0, 0), 'S[0, 0, 0]', None), ((43, 2, 1), 'X, Y, Z', (43, 2, 1))]
param_test_setitem = [({(2, 3, 2): '42'}, {(1, 3, 2): '42'}, {(1, 3, 2): '42', (2, 3, 2): '42'})]
setup_method(method)[source]

Creates empty DataArray

test_eval_cell(key, code, res)[source]

Unit test for _eval_cell

test_execute_macros()[source]

Unit test for execute_macros

test_findnextmatch()[source]

Find method test

test_make_nested_list()[source]

Unit test for _make_nested_list

test_setitem(data, items, res_data)[source]

Unit test for __setitem__

test_slicing()[source]

Unit test for __getitem__ and __setitem__

test_sorted_keys()[source]

Unit test for _sorted_keys

test_string_match()[source]

Tests creation of string_match

class pyspread.model.test.test_model.TestDataArray[source]

Bases: object

Unit tests for DataArray

param_adjust_cell_attributes = [(0, 5, 0, (4, 3, 0), (9, 3, 0)), (34, 5, 0, (4, 3, 0), (4, 3, 0)), (0, 0, 0, (4, 3, 0), (4, 3, 0)), (1, 5, 1, (4, 3, 0), (4, 8, 0)), (1, 5, 1, (4, 3, 1), (4, 8, 1)), (0, -1, 2, (4, 3, 1), None), (0, -1, 2, (4, 3, 2), (4, 3, 1))]
param_adjust_rowcol = [({(0, 0): 3.0}, 0, 2, 0, 0, (0, 0), 3.0), ({(0, 0): 3.0}, 0, 2, 0, 0, (2, 0), 3.0), ({(0, 0): 3.0}, 0, 1, 1, 0, (1, 0), 3.0), ({(0, 0): 3.0}, 0, 1, 1, 0, (0, 1), 0.0)]
param_get_last_filled_cell = [({(0, 0, 0): '2'}, 0, (0, 0)), ({(2, 0, 2): '2'}, 0, (0, 0)), ({(2, 0, 2): '2'}, None, (2, 0)), ({(2, 0, 2): '2'}, 2, (2, 0)), ({(32, 30, 0): '432'}, 0, (32, 30))]
param_test_delete = [({(2, 3, 4): '42'}, 1, 1, 0, None, {(1, 3, 4): '42'}), ({(0, 0, 0): '1'}, 0, 1, 0, 0, {(0, 0, 0): None}), ({(0, 0, 1): '1'}, 0, 1, 2, None, {(0, 0, 0): '1'}), ({(3, 3, 2): '3'}, 0, 2, 2, None, {(3, 3, 0): '3'}), ({(4, 2, 1): '3'}, 2, 1, 1, 1, {(4, 2, 1): None}), ({(10, 0, 0): '1'}, 0, 10, 0, 0, {(0, 0, 0): '1'})]
param_test_insert = [({(2, 3, 0): '42'}, 1, 1, 0, None, {(2, 3, 0): None, (3, 3, 0): '42'}), ({(0, 0, 0): '0', (0, 0, 2): '2'}, 1, 1, 2, None, {(0, 0, 3): '2', (0, 0, 4): None})]
setup_method(method)[source]

Creates empty DataArray

test_adjust_cell_attributes(inspoint, noins, axis, src, target)[source]

Unit test for _adjust_cell_attributes

test_adjust_rowcol(vals, ins_point, no2ins, axis, tab, target, res)[source]

Unit test for _adjust_rowcol

test_cell_array_generator()[source]

Unit test for cell_array_generator

test_delete(data, delpoint, notodel, axis, tab, res)[source]

Tests delete operation

test_delete_error()[source]

Tests delete operation error

test_get_last_filled_cell(content, table, res)[source]

Unit test for get_last_filled_cellet_end

test_get_shape()[source]

Unit test for _get_shape

test_getstate()[source]

Unit test for __getstate__ (pickle support)

test_insert(data, inspoint, notoins, axis, tab, res)[source]

Unit test for insert operation

test_iter()[source]

Unit test for __iter__

test_keys()[source]

Unit test for keys

test_pop()[source]

Unit test for pop

test_set_cell_attributes()[source]

Unit test for _set_cell_attributes

test_set_col_width()[source]

Unit test for set_col_width

test_set_row_height()[source]

Unit test for set_row_height

test_set_shape()[source]

Unit test for _set_shape

test_slicing()[source]

Unit test for __getitem__ and __setitem__

class pyspread.model.test.test_model.TestDictGrid[source]

Bases: object

Unit tests for DictGrid

setup_method(method)[source]

Creates empty DictGrid

test_getitem()[source]

Unit test for __getitem__

test_missing()[source]

Test if missing value returns None

class pyspread.model.test.test_model.TestKeyValueStore[source]

Bases: object

Unit tests for KeyValueStore

setup_method(method)[source]

Creates empty KeyValueStore

test_missing()[source]

Test if missing value returns None

Module contents