convert old fail* assertions to assert*

This commit is contained in:
Benjamin Peterson 2009-06-30 23:06:06 +00:00
parent 98d23f2e06
commit c9c0f201fe
275 changed files with 4540 additions and 4540 deletions

View file

@ -42,13 +42,13 @@ class PosixTester(unittest.TestCase):
def test_statvfs(self):
if hasattr(posix, 'statvfs'):
self.assert_(posix.statvfs(os.curdir))
self.assertTrue(posix.statvfs(os.curdir))
def test_fstatvfs(self):
if hasattr(posix, 'fstatvfs'):
fp = open(support.TESTFN)
try:
self.assert_(posix.fstatvfs(fp.fileno()))
self.assertTrue(posix.fstatvfs(fp.fileno()))
finally:
fp.close()
@ -68,7 +68,7 @@ class PosixTester(unittest.TestCase):
fp = open(support.TESTFN)
try:
fd = posix.dup(fp.fileno())
self.assert_(isinstance(fd, int))
self.assertTrue(isinstance(fd, int))
os.close(fd)
finally:
fp.close()
@ -123,13 +123,13 @@ class PosixTester(unittest.TestCase):
if hasattr(posix, 'fstat'):
fp = open(support.TESTFN)
try:
self.assert_(posix.fstat(fp.fileno()))
self.assertTrue(posix.fstat(fp.fileno()))
finally:
fp.close()
def test_stat(self):
if hasattr(posix, 'stat'):
self.assert_(posix.stat(support.TESTFN))
self.assertTrue(posix.stat(support.TESTFN))
if hasattr(posix, 'chown'):
def test_chown(self):
@ -165,21 +165,21 @@ class PosixTester(unittest.TestCase):
def test_lsdir(self):
if hasattr(posix, 'lsdir'):
self.assert_(support.TESTFN in posix.lsdir(os.curdir))
self.assertTrue(support.TESTFN in posix.lsdir(os.curdir))
def test_access(self):
if hasattr(posix, 'access'):
self.assert_(posix.access(support.TESTFN, os.R_OK))
self.assertTrue(posix.access(support.TESTFN, os.R_OK))
def test_umask(self):
if hasattr(posix, 'umask'):
old_mask = posix.umask(0)
self.assert_(isinstance(old_mask, int))
self.assertTrue(isinstance(old_mask, int))
posix.umask(old_mask)
def test_strerror(self):
if hasattr(posix, 'strerror'):
self.assert_(posix.strerror(0))
self.assertTrue(posix.strerror(0))
def test_pipe(self):
if hasattr(posix, 'pipe'):