@@ -222,22 +222,24 @@ def test_placeholders(self):
222222 args = (PH , 0 )
223223 p = self .partial (capture , * args )
224224 got , empty = p ('x' )
225- self .assertTrue (('x' , 0 ) == got and empty == {})
225+ self .assertEqual (('x' , 0 ), got )
226+ self .assertEqual (empty , {})
226227 # 2 Placeholders
227228 args = (PH , 0 , PH , 1 )
228229 p = self .partial (capture , * args )
229230 with self .assertRaises (TypeError ):
230- got , empty = p ('x' )
231+ p ('x' )
231232 got , empty = p ('x' , 'y' )
232233 expected = ('x' , 0 , 'y' , 1 )
233- self .assertTrue (expected == got and empty == {})
234+ self .assertEqual (expected , got )
235+ self .assertEqual (empty , {})
234236
235237 def test_placeholders_optimization (self ):
236238 PH = self .module .Placeholder
237239 p = self .partial (capture , PH , 0 )
238240 p2 = self .partial (p , PH , 1 , 2 , 3 )
239241 expected = (PH , 0 , 1 , 2 , 3 )
240- self .assertTrue (expected == p2 .args )
242+ self .assertEqual (expected , p2 .args )
241243 p3 = self .partial (p2 , - 1 , 4 )
242244 got , empty = p3 (5 )
243245 expected = (- 1 , 0 , 1 , 2 , 3 , 4 , 5 )
@@ -246,8 +248,8 @@ def test_placeholders_optimization(self):
246248 p = self .partial (capture , PH , 0 )
247249 p2 = self .partial (p )
248250 expected = (PH , 0 )
249- self .assertTrue (expected == p2 .args )
250- self .assertTrue (((1 , 0 ), {}) == p2 (1 ))
251+ self .assertEqual (expected , p2 .args )
252+ self .assertEqual (((1 , 0 ), {}), p2 (1 ))
251253
252254 def test_construct_placeholder_singleton (self ):
253255 PH = self .module .Placeholder
0 commit comments