41
41
TestBase ,
42
42
with_rw_repo ,
43
43
fixture ,
44
- assert_false ,
45
- assert_true
44
+ assert_false
46
45
)
47
46
from git .util import HIDE_WINDOWS_KNOWN_ERRORS , cygpath
48
47
from git .test .lib import with_rw_directory
@@ -243,12 +242,12 @@ def test_clone_from_with_path_contains_unicode(self):
243
242
244
243
@with_rw_repo ('HEAD' )
245
244
def test_max_chunk_size (self , repo ):
246
- class TestOutputStream (object ):
245
+ class TestOutputStream (TestBase ):
247
246
def __init__ (self , max_chunk_size ):
248
247
self .max_chunk_size = max_chunk_size
249
248
250
249
def write (self , b ):
251
- assert_true (len (b ) <= self .max_chunk_size )
250
+ self . assertTrue (len (b ) <= self .max_chunk_size )
252
251
253
252
for chunk_size in [16 , 128 , 1024 ]:
254
253
repo .git .status (output_stream = TestOutputStream (chunk_size ), max_chunk_size = chunk_size )
@@ -404,7 +403,7 @@ def test_should_display_blame_information(self, git):
404
403
# self.assertEqual(25, reduce(lambda acc, x: acc + len(x[-1]), b))
405
404
self .assertEqual (hash (b [0 ][0 ]), hash (b [9 ][0 ]))
406
405
c = b [0 ][0 ]
407
- assert_true (git .called )
406
+ self . assertTrue (git .called )
408
407
409
408
self .assertEqual ('634396b2f541a9f2d58b00be1a07f0c358b999b3' , c .hexsha )
410
409
self .assertEqual ('Tom Preston-Werner' , c .author .name )
@@ -417,9 +416,9 @@ def test_should_display_blame_information(self, git):
417
416
418
417
# test the 'lines per commit' entries
419
418
tlist = b [0 ][1 ]
420
- assert_true (tlist )
421
- assert_true (isinstance (tlist [0 ], str ))
422
- assert_true (len (tlist ) < sum (len (t ) for t in tlist )) # test for single-char bug
419
+ self . assertTrue (tlist )
420
+ self . assertTrue (isinstance (tlist [0 ], str ))
421
+ self . assertTrue (len (tlist ) < sum (len (t ) for t in tlist )) # test for single-char bug
423
422
424
423
# BINARY BLAME
425
424
git .return_value = fixture ('blame_binary' )
0 commit comments