mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
convert usage of fail* to assert*
This commit is contained in:
parent
be96cf608f
commit
5c8da86f3a
268 changed files with 5017 additions and 5017 deletions
|
@ -38,7 +38,7 @@ class DircacheTests(unittest.TestCase):
|
|||
self.assertEquals(entries, [])
|
||||
|
||||
# Check that cache is actually caching, not just passing through.
|
||||
self.assert_(dircache.listdir(self.tempdir) is entries)
|
||||
self.assertTrue(dircache.listdir(self.tempdir) is entries)
|
||||
|
||||
# Directories aren't "files" on Windows, and directory mtime has
|
||||
# nothing to do with when files under a directory get created.
|
||||
|
@ -53,7 +53,7 @@ class DircacheTests(unittest.TestCase):
|
|||
self.writeTemp("test1")
|
||||
entries = dircache.listdir(self.tempdir)
|
||||
self.assertEquals(entries, ['test1'])
|
||||
self.assert_(dircache.listdir(self.tempdir) is entries)
|
||||
self.assertTrue(dircache.listdir(self.tempdir) is entries)
|
||||
|
||||
## UNSUCCESSFUL CASES
|
||||
self.assertRaises(OSError, dircache.listdir, self.tempdir+"_nonexistent")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue