@@ -27,8 +27,7 @@ class ModuleAnchorMixin:
2727
2828class FunctionalAPIBase :
2929 def _gen_resourcetxt_path_parts (self ):
30- """Yield various names of a text file in anchor02, each in a subTest
31- """
30+ """Yield various names of a text file in anchor02, each in a subTest"""
3231 for path_parts in (
3332 ('subdirectory' , 'subsubdir' , 'resource.txt' ),
3433 ('subdirectory/subsubdir/resource.txt' ,),
@@ -44,15 +43,20 @@ def test_read_text(self):
4443 )
4544 self .assertEqual (
4645 resources .read_text (
47- self .anchor02 , 'subdirectory' , 'subsubdir' , 'resource.txt' ,
46+ self .anchor02 ,
47+ 'subdirectory' ,
48+ 'subsubdir' ,
49+ 'resource.txt' ,
4850 encoding = 'utf-8' ,
4951 ),
5052 'a resource' ,
5153 )
5254 for path_parts in self ._gen_resourcetxt_path_parts ():
5355 self .assertEqual (
5456 resources .read_text (
55- self .anchor02 , * path_parts , encoding = 'utf-8' ,
57+ self .anchor02 ,
58+ * path_parts ,
59+ encoding = 'utf-8' ,
5660 ),
5761 'a resource' ,
5862 )
@@ -99,7 +103,8 @@ def test_open_text(self):
99103 self .assertEqual (f .read (), 'Hello, UTF-8 world!\n ' )
100104 for path_parts in self ._gen_resourcetxt_path_parts ():
101105 with resources .open_text (
102- self .anchor02 , * path_parts ,
106+ self .anchor02 ,
107+ * path_parts ,
103108 encoding = 'utf-8' ,
104109 ) as f :
105110 self .assertEqual (f .read (), 'a resource' )
@@ -135,7 +140,8 @@ def test_open_binary(self):
135140 self .assertEqual (f .read (), b'Hello, UTF-8 world!\n ' )
136141 for path_parts in self ._gen_resourcetxt_path_parts ():
137142 with resources .open_binary (
138- self .anchor02 , * path_parts ,
143+ self .anchor02 ,
144+ * path_parts ,
139145 ) as f :
140146 self .assertEqual (f .read (), b'a resource' )
141147
@@ -213,18 +219,24 @@ def test_text_errors(self):
213219 # Multiple path arguments need explicit encoding argument.
214220 with self .assertRaises (TypeError ):
215221 func (
216- self .anchor02 , 'subdirectory' ,
217- 'subsubdir' , 'resource.txt' ,
222+ self .anchor02 ,
223+ 'subdirectory' ,
224+ 'subsubdir' ,
225+ 'resource.txt' ,
218226 )
219227
220228
221229class FunctionalAPITest_StringAnchor (
222- unittest .TestCase , FunctionalAPIBase , StringAnchorMixin ,
230+ unittest .TestCase ,
231+ FunctionalAPIBase ,
232+ StringAnchorMixin ,
223233):
224234 pass
225235
226236
227237class FunctionalAPITest_ModuleAnchor (
228- unittest .TestCase , FunctionalAPIBase , ModuleAnchorMixin ,
238+ unittest .TestCase ,
239+ FunctionalAPIBase ,
240+ ModuleAnchorMixin ,
229241):
230242 pass
0 commit comments