@@ -166,7 +166,7 @@ def test_empty_conf(self):
166166 def test_conf_abs (self ):
167167 with tempfile .NamedTemporaryFile () as cf :
168168 with self .mock_option ('conf' , cf .name ), self .mock_option ('debug' , False ):
169- cf .write ('debug=True\n ' . encode ( 'utf-8' ) )
169+ cf .write (b 'debug=True\n ' )
170170 cf .flush ()
171171 apply_options ('flower' , argv = ['--conf=%s' % cf .name ])
172172 self .assertEqual (cf .name , options .conf )
@@ -175,7 +175,7 @@ def test_conf_abs(self):
175175 def test_conf_relative (self ):
176176 with tempfile .NamedTemporaryFile (dir = '.' ) as cf :
177177 with self .mock_option ('conf' , cf .name ), self .mock_option ('debug' , False ):
178- cf .write ('debug=True\n ' . encode ( 'utf-8' ) )
178+ cf .write (b 'debug=True\n ' )
179179 cf .flush ()
180180 apply_options ('flower' , argv = ['--conf=%s' % os .path .basename (cf .name )])
181181 self .assertTrue (options .debug )
@@ -184,7 +184,7 @@ def test_conf_relative(self):
184184 def test_all_options_documented (self ):
185185 def grep (patter , filename ):
186186 return int (subprocess .check_output (
187- 'grep "%s" %s |wc -l' % (patter , filename ), shell = True ))
187+ 'grep "{}" {} |wc -l' . format (patter , filename ), shell = True ))
188188
189189 defined = grep ('^define(' , 'flower/options.py' )
190190 documented = grep ('^~~' , 'docs/config.rst' )
0 commit comments