[pypy-svn] pypy default: (lac, arigo)

arigo commits-noreply at bitbucket.org
Wed Jan 19 17:34:14 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r40942:23232203a34a
Date: 2011-01-18 18:29 +0100
http://bitbucket.org/pypy/pypy/changeset/23232203a34a/

Log:	(lac, arigo)

	Accept both TypeErrors and IOErrors here, as either could be
	detected first and both are wrong.

diff --git a/lib-python/modified-2.7.0/test/test_builtin.py b/lib-python/modified-2.7.0/test/test_builtin.py
--- a/lib-python/modified-2.7.0/test/test_builtin.py
+++ b/lib-python/modified-2.7.0/test/test_builtin.py
@@ -494,9 +494,10 @@
         execfile(TESTFN, globals, locals)
         self.assertEqual(locals['z'], 2)
 
+        self.assertRaises(TypeError, execfile, TESTFN, {}, ())
         unlink(TESTFN)
         self.assertRaises(TypeError, execfile)
-        self.assertRaises(TypeError, execfile, TESTFN, {}, ())
+        self.assertRaises((TypeError, IOError), execfile, TESTFN, {}, ())
         import os
         self.assertRaises(IOError, execfile, os.curdir)
         self.assertRaises(IOError, execfile, "I_dont_exist")


More information about the Pypy-commit mailing list