[pypy-svn] r27749 - pypy/dist/pypy/translator/cli/test
antocuni at codespeak.net
antocuni at codespeak.net
Sat May 27 10:18:00 CEST 2006
Author: antocuni
Date: Sat May 27 10:17:43 2006
New Revision: 27749
Modified:
pypy/dist/pypy/translator/cli/test/runtest.py
pypy/dist/pypy/translator/cli/test/test_runtest.py
Log:
Fixed a bug in CliTest.interpret_raises.
Modified: pypy/dist/pypy/translator/cli/test/runtest.py
==============================================================================
--- pypy/dist/pypy/translator/cli/test/runtest.py (original)
+++ pypy/dist/pypy/translator/cli/test/runtest.py Sat May 27 10:17:43 2006
@@ -211,8 +211,8 @@
import exceptions # needed by eval
res = self.interpret(fn, args)
assert isinstance(res, ExceptionWrapper)
- assert eval(res.class_name) is exception
-
+ assert issubclass(eval(res.class_name), exception)
+
def ll_to_string(self, s):
py.test.skip('ll_to_string not supported, yet')
Modified: pypy/dist/pypy/translator/cli/test/test_runtest.py
==============================================================================
--- pypy/dist/pypy/translator/cli/test/test_runtest.py (original)
+++ pypy/dist/pypy/translator/cli/test/test_runtest.py Sat May 27 10:17:43 2006
@@ -35,3 +35,8 @@
def fn():
raise ValueError
self.interpret_raises(ValueError, fn, [])
+
+ def test_exception_subclass(self):
+ def fn():
+ raise IndexError
+ self.interpret_raises(LookupError, fn, [])
More information about the Pypy-commit
mailing list