|
23 | 23 |
|
24 | 24 | class DescribeTable(object):
|
25 | 25 |
|
| 26 | + def it_knows_whether_it_should_autofit(self, autofit_get_fixture): |
| 27 | + table, expected_value = autofit_get_fixture |
| 28 | + assert table.autofit is expected_value |
| 29 | + |
| 30 | + def it_can_change_its_autofit_setting(self, autofit_set_fixture): |
| 31 | + table, new_value, expected_xml = autofit_set_fixture |
| 32 | + table.autofit = new_value |
| 33 | + assert table._tbl.xml == expected_xml |
| 34 | + |
| 35 | + def it_knows_its_table_style(self, table_style_get_fixture): |
| 36 | + table, style = table_style_get_fixture |
| 37 | + assert table.style == style |
| 38 | + |
| 39 | + def it_can_apply_a_table_style_by_name(self, table_style_set_fixture): |
| 40 | + table, style_name, expected_xml = table_style_set_fixture |
| 41 | + table.style = style_name |
| 42 | + assert table._tbl.xml == expected_xml |
| 43 | + |
| 44 | + def it_knows_it_is_the_table_its_children_belong_to(self, table_fixture): |
| 45 | + table = table_fixture |
| 46 | + assert table.table is table |
| 47 | + |
| 48 | + def it_knows_its_column_count_to_help(self, column_count_fixture): |
| 49 | + table, expected_value = column_count_fixture |
| 50 | + column_count = table._column_count |
| 51 | + assert column_count == expected_value |
| 52 | + |
26 | 53 | def it_provides_access_to_the_table_rows(self, table):
|
27 | 54 | rows = table.rows
|
28 | 55 | assert isinstance(rows, _Rows)
|
@@ -64,33 +91,6 @@ def it_can_add_a_column(self, add_column_fixture):
|
64 | 91 | assert isinstance(column, _Column)
|
65 | 92 | assert column._gridCol is table._tbl.tblGrid.gridCol_lst[1]
|
66 | 93 |
|
67 |
| - def it_knows_its_table_style(self, table_style_get_fixture): |
68 |
| - table, style = table_style_get_fixture |
69 |
| - assert table.style == style |
70 |
| - |
71 |
| - def it_can_apply_a_table_style_by_name(self, table_style_set_fixture): |
72 |
| - table, style_name, expected_xml = table_style_set_fixture |
73 |
| - table.style = style_name |
74 |
| - assert table._tbl.xml == expected_xml |
75 |
| - |
76 |
| - def it_knows_whether_it_should_autofit(self, autofit_get_fixture): |
77 |
| - table, expected_value = autofit_get_fixture |
78 |
| - assert table.autofit is expected_value |
79 |
| - |
80 |
| - def it_can_change_its_autofit_setting(self, autofit_set_fixture): |
81 |
| - table, new_value, expected_xml = autofit_set_fixture |
82 |
| - table.autofit = new_value |
83 |
| - assert table._tbl.xml == expected_xml |
84 |
| - |
85 |
| - def it_knows_it_is_the_table_its_children_belong_to(self, table_fixture): |
86 |
| - table = table_fixture |
87 |
| - assert table.table is table |
88 |
| - |
89 |
| - def it_knows_its_column_count_to_help(self, column_count_fixture): |
90 |
| - table, expected_value = column_count_fixture |
91 |
| - column_count = table._column_count |
92 |
| - assert column_count == expected_value |
93 |
| - |
94 | 94 | def it_provides_access_to_its_cells_to_help(self, cells_fixture):
|
95 | 95 | table, cell_count, unique_count, matches = cells_fixture
|
96 | 96 | cells = table._cells
|
|
0 commit comments