Skip to content

Commit a18b013

Browse files
author
Steve Canny
committed
tbl: reorder tests
1 parent e22465d commit a18b013

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

tests/test_table.py

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,33 @@
2323

2424
class DescribeTable(object):
2525

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+
2653
def it_provides_access_to_the_table_rows(self, table):
2754
rows = table.rows
2855
assert isinstance(rows, _Rows)
@@ -64,33 +91,6 @@ def it_can_add_a_column(self, add_column_fixture):
6491
assert isinstance(column, _Column)
6592
assert column._gridCol is table._tbl.tblGrid.gridCol_lst[1]
6693

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-
9494
def it_provides_access_to_its_cells_to_help(self, cells_fixture):
9595
table, cell_count, unique_count, matches = cells_fixture
9696
cells = table._cells

0 commit comments

Comments
 (0)