@@ -232,17 +232,26 @@ def table(self):
232232
233233class Describe_Cell (object ):
234234
235- def it_can_add_a_paragraph (self , add_paragraph_fixture ):
236- cell , expected_xml = add_paragraph_fixture
237- p = cell .add_paragraph ()
235+ def it_knows_what_text_it_contains (self , text_get_fixture ):
236+ cell , expected_text = text_get_fixture
237+ text = cell .text
238+ assert text == expected_text
239+
240+ def it_can_replace_its_content_with_a_string_of_text (
241+ self , text_set_fixture ):
242+ cell , text , expected_xml = text_set_fixture
243+ cell .text = text
238244 assert cell ._tc .xml == expected_xml
239- assert isinstance (p , Paragraph )
240245
241- def it_can_add_a_table (self , add_table_fixture ):
242- cell , expected_xml = add_table_fixture
243- table = cell .add_table (rows = 0 , cols = 0 )
246+ def it_knows_its_width_in_EMU (self , width_get_fixture ):
247+ cell , expected_width = width_get_fixture
248+ assert cell .width == expected_width
249+
250+ def it_can_change_its_width (self , width_set_fixture ):
251+ cell , value , expected_xml = width_set_fixture
252+ cell .width = value
253+ assert cell .width == value
244254 assert cell ._tc .xml == expected_xml
245- assert isinstance (table , Table )
246255
247256 def it_provides_access_to_the_paragraphs_it_contains (
248257 self , paragraphs_fixture ):
@@ -268,26 +277,17 @@ def it_provides_access_to_the_tables_it_contains(self, tables_fixture):
268277 count += 1
269278 assert count == expected_count
270279
271- def it_knows_what_text_it_contains (self , text_get_fixture ):
272- cell , expected_text = text_get_fixture
273- text = cell .text
274- assert text == expected_text
275-
276- def it_can_replace_its_content_with_a_string_of_text (
277- self , text_set_fixture ):
278- cell , text , expected_xml = text_set_fixture
279- cell .text = text
280+ def it_can_add_a_paragraph (self , add_paragraph_fixture ):
281+ cell , expected_xml = add_paragraph_fixture
282+ p = cell .add_paragraph ()
280283 assert cell ._tc .xml == expected_xml
284+ assert isinstance (p , Paragraph )
281285
282- def it_knows_its_width_in_EMU (self , width_get_fixture ):
283- cell , expected_width = width_get_fixture
284- assert cell .width == expected_width
285-
286- def it_can_change_its_width (self , width_set_fixture ):
287- cell , value , expected_xml = width_set_fixture
288- cell .width = value
289- assert cell .width == value
286+ def it_can_add_a_table (self , add_table_fixture ):
287+ cell , expected_xml = add_table_fixture
288+ table = cell .add_table (rows = 0 , cols = 0 )
290289 assert cell ._tc .xml == expected_xml
290+ assert isinstance (table , Table )
291291
292292 # fixtures -------------------------------------------------------
293293
0 commit comments