@@ -61,9 +61,9 @@ def it_can_set_its_paragraph_style(self):
6161 p .style = style
6262 assert p_elm .style == expected_setting
6363
64- def it_knows_the_text_it_contains (self , text_prop_fixture ):
65- p , expected_text = text_prop_fixture
66- assert p .text == expected_text
64+ def it_knows_the_text_it_contains (self , text_get_fixture ):
65+ paragraph , expected_text = text_get_fixture
66+ assert paragraph .text == expected_text
6767
6868 def it_can_insert_a_paragraph_before_itself (self , insert_before_fixture ):
6969 paragraph , text , style , body , expected_xml = insert_before_fixture
@@ -135,6 +135,24 @@ def insert_before_fixture(self):
135135 ).xml ()
136136 return paragraph , text , style , body , expected_xml
137137
138+ @pytest .fixture
139+ def runs_fixture (self , p_ , Run_ , r_ , r_2_ , runs_ ):
140+ paragraph = Paragraph (p_ )
141+ run_ , run_2_ = runs_
142+ return paragraph , Run_ , r_ , r_2_ , run_ , run_2_
143+
144+ @pytest .fixture
145+ def text_get_fixture (self ):
146+ p = (
147+ a_p ().with_nsdecls ().with_child (
148+ an_r ().with_child (
149+ a_t ().with_text ('foo' ))).with_child (
150+ an_r ().with_child (
151+ a_t ().with_text (' de bar' )))
152+ ).element
153+ paragraph = Paragraph (p )
154+ return paragraph , 'foo de bar'
155+
138156 # fixture components ---------------------------------------------
139157
140158 @pytest .fixture
@@ -167,24 +185,6 @@ def runs_(self, request):
167185 run_2_ = instance_mock (request , Run , name = 'run_2_' )
168186 return run_ , run_2_
169187
170- @pytest .fixture
171- def runs_fixture (self , p_ , Run_ , r_ , r_2_ , runs_ ):
172- paragraph = Paragraph (p_ )
173- run_ , run_2_ = runs_
174- return paragraph , Run_ , r_ , r_2_ , run_ , run_2_
175-
176- @pytest .fixture
177- def text_prop_fixture (self ):
178- p = (
179- a_p ().with_nsdecls ().with_child (
180- an_r ().with_child (
181- a_t ().with_text ('foo' ))).with_child (
182- an_r ().with_child (
183- a_t ().with_text (' de bar' )))
184- ).element
185- paragraph = Paragraph (p )
186- return paragraph , 'foo de bar'
187-
188188
189189class DescribeRun (object ):
190190
0 commit comments