@@ -45,24 +45,22 @@ def test_list_all_reference_objects(self):
4545
4646 refs = [(ref .name , ref .target .hex )
4747 for ref in repo .references .objects ]
48- self .assertEqual (sorted (refs ),
49- [('refs/heads/i18n' ,
50- '5470a671a80ac3789f1a6a8cefbcf43ce7af0563' ),
51- ('refs/heads/master' ,
52- '2be5719152d4f82c7302b1c0932d8e5f0a4a0e98' )])
48+ assert sorted (refs ) == [
49+ ('refs/heads/i18n' , '5470a671a80ac3789f1a6a8cefbcf43ce7af0563' ),
50+ ('refs/heads/master' , '2be5719152d4f82c7302b1c0932d8e5f0a4a0e98' )]
5351
5452 def test_list_all_references (self ):
5553 repo = self .repo
5654
5755 # Without argument
58- self . assertEqual ( sorted (repo .references ),
59- [ 'refs/heads/i18n' , 'refs/heads/master' ])
56+ assert sorted (repo .references ) == [ 'refs/heads/i18n' ,
57+ 'refs/heads/master' ]
6058
6159 # We add a symbolic reference
6260 repo .create_reference ('refs/tags/version1' , 'refs/heads/master' )
63- self . assertEqual ( sorted (repo .references ),
64- [ 'refs/heads/i18n' , 'refs/heads/master' ,
65- 'refs/tags/version1' ])
61+ assert sorted (repo .references ) == [ 'refs/heads/i18n' ,
62+ 'refs/heads/master' ,
63+ 'refs/tags/version1' ]
6664
6765 def test_head (self ):
6866 head = self .repo .head
@@ -236,27 +234,24 @@ def test_peel(self):
236234class ReferencesTest (utils .RepoTestCase ):
237235 def test_list_all_reference_objects (self ):
238236 repo = self .repo
239-
240237 refs = [(ref .name , ref .target .hex )
241238 for ref in repo .listall_reference_objects ()]
242- self .assertEqual (sorted (refs ),
243- [('refs/heads/i18n' ,
244- '5470a671a80ac3789f1a6a8cefbcf43ce7af0563' ),
245- ('refs/heads/master' ,
246- '2be5719152d4f82c7302b1c0932d8e5f0a4a0e98' )])
239+
240+ assert sorted (refs ) == [
241+ ('refs/heads/i18n' , '5470a671a80ac3789f1a6a8cefbcf43ce7af0563' ),
242+ ('refs/heads/master' , '2be5719152d4f82c7302b1c0932d8e5f0a4a0e98' )]
247243
248244 def test_list_all_references (self ):
249245 repo = self .repo
250246
251247 # Without argument
252- self .assertEqual (sorted (repo .listall_references ()),
253- ['refs/heads/i18n' , 'refs/heads/master' ])
248+ assert sorted (repo .listall_references ()) == ['refs/heads/i18n' , 'refs/heads/master' ]
254249
255250 # We add a symbolic reference
256251 repo .create_reference ('refs/tags/version1' , 'refs/heads/master' )
257- self . assertEqual ( sorted (repo .listall_references ()),
258- [ 'refs/heads/i18n' , 'refs/heads/master' ,
259- 'refs/tags/version1' ])
252+ assert sorted (repo .listall_references ()) == [ 'refs/heads/i18n' ,
253+ 'refs/heads/master' ,
254+ 'refs/tags/version1' ]
260255
261256 def test_head (self ):
262257 head = self .repo .head
0 commit comments