File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -789,7 +789,7 @@ def test_complete_multi_phase_init_module(self):
789789
790790
791791class PatchAtomicWrites ():
792- def __init__ (self , truncate_at_length = 100 , never_complete = False ):
792+ def __init__ (self , truncate_at_length , never_complete = False ):
793793 self .truncate_at_length = truncate_at_length
794794 self .never_complete = never_complete
795795 self .seen_write = False
@@ -833,9 +833,9 @@ def test_atomic_write_retries_incomplete_writes(self):
833833 # truncate.
834834 content = b'x' * length
835835 _bootstrap_external ._write_atomic (os_helper .TESTFN , content )
836- assert cm .seen_write
836+ self . assertTrue ( cm .seen_write )
837837
838- assert os .stat (support .os_helper .TESTFN ).st_size == length
838+ self . assertEqual ( os .stat (support .os_helper .TESTFN ).st_size , length )
839839 os .unlink (support .os_helper .TESTFN )
840840
841841 def test_atomic_write_errors_if_unable_to_complete (self ):
@@ -851,7 +851,7 @@ def test_atomic_write_errors_if_unable_to_complete(self):
851851 # truncate.
852852 content = b'x' * (truncate_at_length * 2 )
853853 _bootstrap_external ._write_atomic (os_helper .TESTFN , content )
854- assert cm .seen_write
854+ self . assertTrue ( cm .seen_write )
855855
856856 with self .assertRaises (OSError ):
857857 os .stat (support .os_helper .TESTFN ) # Check that the file did not get written.
You can’t perform that action at this time.
0 commit comments