pyspread.test package¶
Submodules¶
pyspread.test.test_cli module¶
test_cli¶
Unit tests for cli.py
pyspread.test.test_grid module¶
test_grid¶
Unit tests for grid.py
- class pyspread.test.test_grid.TestGrid[source]¶
Bases:
object
Unit tests for Grid in grid.py
- cell_attributes = []¶
- grid = <pyspread.grid.Grid object>¶
- param_test_column = [(0, 0), (1, 1), (100, 0), (1000, 0), (10000, 0), (-1, 0)]¶
- param_test_column_widths = [({0: 23}, {0: 23}), ({1: 3}, {1: 3.0}), ({0: 23, 12: 200}, {0: 23, 12: 200})]¶
- param_test_on_zoom_in = [(0.4, 0.5), (0.5, 0.6), (0.6, 0.7), (0.7, 0.8), (0.8, 1.0), (1.0, 1.2), (1.2, 1.4), (1.4, 1.6), (1.6, 1.8), (1.8, 2.0), (2.0, 2.5), (2.5, 3.0), (3.0, 3.5), (3.5, 4.0), (4.0, 5.0), (5.0, 6.0), (6.0, 8.0), (8.0, 8.0)]¶
- param_test_on_zoom_out = [(0.5, 0.4), (0.6, 0.5), (0.7, 0.6), (0.8, 0.7), (1.0, 0.8), (1.2, 1.0), (1.4, 1.2), (1.6, 1.4), (1.8, 1.6), (2.0, 1.8), (2.5, 2.0), (3.0, 2.5), (3.5, 3.0), (4.0, 3.5), (5.0, 4.0), (6.0, 5.0), (8.0, 6.0), (0.4, 0.4)]¶
- param_test_row = [(0, 0), (1, 1), (100, 100), (1000, 0), (10000, 0), (-1, 0)]¶
- param_test_row_heights = [({0: 23}, {0: 23}), ({1: 3}, {1: 3.0}), ({0: 23, 12: 200}, {0: 23, 12: 200})]¶
- param_test_selected_idx_to_str = [([<PyQt6.QtCore.QModelIndex object>], '(2, 4, 0)'), ([<PyQt6.QtCore.QModelIndex object>, <PyQt6.QtCore.QModelIndex object>], '(2, 4, 0), (3, 4, 0)')]¶
- param_test_selection_blocks = [((0, 0, 1, 1), Selection([(0, 0)], [(1, 1)], [], [], [])), ((1, 2, 14, 19), Selection([(1, 2)], [(14, 19)], [], [], []))]¶
- param_test_selection_cells = [(((0, 0),), Selection([], [], [], [], [(0, 0)])), (((0, 0), (1, 0)), Selection([], [], [], [], [(0, 0), (1, 0)])), (((0, 0), (999, 0)), Selection([], [], [], [], [(0, 0), (999, 0)])), (((0, 0), (1, 0), (0, 1), (1, 1)), Selection([], [], [], [], [(0, 0), (1, 0), (0, 1), (1, 1)]))]¶
- param_test_selection_columns = [((0,), Selection([], [], [], [0], [])), ((1, 2), Selection([], [], [], [1, 2], []))]¶
- param_test_selection_rows = [((0,), Selection([], [], [0], [], [])), ((1, 2), Selection([], [], [1, 2], [], []))]¶
- param_test_set_selection_mode = [(True, (0, 0, 0), (0, 0, 0), <EditTrigger.NoEditTriggers: 0>), (False, (1, 2, 3), None, <EditTrigger.DoubleClicked|EditKeyPressed|AnyKeyPressed: 26>)]¶
- param_test_table = [(0, 0), (1, 1), (3, 0), (-1, 0)]¶
- param_test_zoom = [(1, 1), (2, 2), (8, 8), (0, 1), (100, 1), (-1, 1)]¶
- test_current2(row, row_res, column, column_res, monkeypatch)[source]¶
Unit test for current getter and setter with 2 parameters
- class pyspread.test.test_grid.TestGridCellDelegate[source]¶
Bases:
object
Unit tests for GridCellDelegate in grid.py
- class pyspread.test.test_grid.TestGridHeaderView[source]¶
Bases:
object
Unit tests for GridHeaderView in grid.py
- class pyspread.test.test_grid.TestGridTableModel[source]¶
Bases:
object
Unit tests for GridTableModel in grid.py
- model = <pyspread.grid.GridTableModel object>¶
- param_test_code = [(0, 0, '', None), (0, 0, 'None', 'None'), (0, 0, '2+6', '2+6'), (1, 1, 'test', 'test')]¶
- param_test_insertColumns = [(0, 5, (0, 0, 0), '0', (0, 5, 0), '0'), (0, 5, (0, 0, 0), '0', (0, 0, 0), None), (0, 0, (0, 0, 0), '0', (0, 0, 0), '0'), (3, 5, (0, 0, 0), '0', (0, 0, 0), '0'), (0, 50, (0, 0, 0), '0', (0, 50, 0), '0')]¶
- param_test_insertRows = [(0, 5, (0, 0, 0), '0', (5, 0, 0), '0'), (0, 5, (0, 0, 0), '0', (0, 0, 0), None), (0, 0, (0, 0, 0), '0', (0, 0, 0), '0'), (3, 5, (0, 0, 0), '0', (0, 0, 0), '0'), (0, 500, (0, 0, 0), '0', (500, 0, 0), '0')]¶
- param_test_insertTable = [(0, (0, 0, 0), '0', (0, 0, 1), '0'), (0, (0, 0, 0), '0', (0, 0, 0), None), (2, (0, 0, 0), '0', (0, 0, 0), '0')]¶
- param_test_removeColumns = [(0, 2, (0, 2, 0), '0', (0, 0, 0), '0'), (0, 2, (0, 0, 0), '0', (0, 0, 0), None), (0, 0, (0, 0, 0), '0', (0, 0, 0), '0'), (3, 1, (0, 0, 0), '0', (0, 0, 0), '0')]¶
- param_test_removeRows = [(0, 5, (5, 0, 0), '0', (0, 0, 0), '0'), (0, 5, (0, 0, 0), '0', (0, 0, 0), None), (0, 0, (0, 0, 0), '0', (0, 0, 0), '0'), (3, 5, (0, 0, 0), '0', (0, 0, 0), '0'), (0, 499, (500, 0, 0), '0', (1, 0, 0), '0')]¶
- param_test_removeTable = [(0, (0, 0, 1), '0', (0, 0, 0), '0'), (0, (0, 0, 0), '0', (0, 0, 0), None), (1, (0, 0, 2), '0', (0, 0, 1), '0')]¶
- param_test_shape = [((1, 1, 1), (1, 1, 1), None), ((0, 0, 0), (1000, 100, 3), <class 'ValueError'>), ((9999999999, 0, 0), (1000, 100, 3), <class 'ValueError'>), ((1000000, 10000, 10), (1000000, 10000, 10), None), ((1000, 100, 3), (1000, 100, 3), None)]¶
pyspread.test.test_grid_renderer module¶
test_grid_renderer¶
Unit tests for grid_renderer.py
Bases:
object
Unit tests for GridCellNavigator in grid_renderer.py
Unit test for above_keys
Unit test for above_left_key
Unit test for above_right_key
Unit test for below_keys
Unit test for below_left_key
Unit test for below_right_key
Unit test for left_keys
Unit test for right_keys
pyspread.test.test_pyspread module¶
test_grid¶
Unit tests for grid.py
pyspread.test.test_workflows module¶
test_workflows¶
Unit tests for workflows.py
- class pyspread.test.test_workflows.TestWorkflows[source]¶
Bases:
object
Unit tests for Workflows in workflows.py
- param_count_file_lines = [('', 0, 'counttest.txt', None), ('\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n', 100, 'counttest.txt', None), ('TestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTest', 0, 'counttest.txt', None), ('Test\nTest\nTest\nTest\nTest\nTest\nTest\nTest\nTest\nTest\n', 10, 'counttest.txt', None), ('Test\nTest\nTest\nTest\nTest\nTest\nTest\nTest\nTest\nTest\n', None, 'false_filename.txt', 'Error')]¶
- param_file_new = [((1000, 100, 3), (1000, 100, 3), None), ((100, 100, 3), (100, 100, 3), None), ((10000000, 100, 3), (1000, 100, 3), 'Error: Grid shape (10000000, 100, 3) exceeds (1000000, 100000, 100).'), (None, (1000, 100, 3), None)]¶
- param_update_main_window_title = [(PosixPath('/root'), 'pyspread'), (PosixPath('/test.pys'), 'test.pys - pyspread')]¶
- workflows = <pyspread.workflows.Workflows object>¶