From 62c3c794264ee30dfb49cd292cd2e21869b68452 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 5 Jun 2010 22:28:10 +0000 Subject: [PATCH] Replace deprecated fail* methods with the equivalent assert* ones. --- Lib/test/test_shutil.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index 54e1c479482..d6839359bd7 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -751,8 +751,8 @@ class TestCopyFile(unittest.TestCase): self._set_shutil_open(_open) shutil.copyfile('srcfile', 'destfile') - self.failUnless(srcfile._entered) - self.failUnless(srcfile._exited_with[0] is IOError) + self.assertTrue(srcfile._entered) + self.assertTrue(srcfile._exited_with[0] is IOError) self.assertEqual(srcfile._exited_with[1].args, ('Cannot open "destfile"',)) @@ -771,10 +771,10 @@ class TestCopyFile(unittest.TestCase): self._set_shutil_open(_open) shutil.copyfile('srcfile', 'destfile') - self.failUnless(srcfile._entered) - self.failUnless(destfile._entered) - self.failUnless(destfile._raised) - self.failUnless(srcfile._exited_with[0] is IOError) + self.assertTrue(srcfile._entered) + self.assertTrue(destfile._entered) + self.assertTrue(destfile._raised) + self.assertTrue(srcfile._exited_with[0] is IOError) self.assertEqual(srcfile._exited_with[1].args, ('Cannot close',)) @@ -794,11 +794,11 @@ class TestCopyFile(unittest.TestCase): self.assertRaises(IOError, shutil.copyfile, 'srcfile', 'destfile') - self.failUnless(srcfile._entered) - self.failUnless(destfile._entered) - self.failIf(destfile._raised) - self.failUnless(srcfile._exited_with[0] is None) - self.failUnless(srcfile._raised) + self.assertTrue(srcfile._entered) + self.assertTrue(destfile._entered) + self.assertFalse(destfile._raised) + self.assertTrue(srcfile._exited_with[0] is None) + self.assertTrue(srcfile._raised) def test_main():