Author: Brian Kearns <[email protected]>
Branch: rpython-enverror
Changeset: r73326:b98721991115
Date: 2014-09-05 15:16 -0400
http://bitbucket.org/pypy/pypy/changeset/b98721991115/

Log:    enhance test

diff --git a/rpython/rtyper/test/test_exception.py 
b/rpython/rtyper/test/test_exception.py
--- a/rpython/rtyper/test/test_exception.py
+++ b/rpython/rtyper/test/test_exception.py
@@ -38,9 +38,11 @@
         def g(n):
             raise IOError(n)
         def h(n):
-            raise OSError(n, "?")
+            raise OSError(n, "?", None)
         def i(n):
             raise EnvironmentError(n, "?", "test")
+        def j(n):
+            raise IOError(0, "test")
         def f(n):
             try:
                 g(n)
@@ -66,6 +68,12 @@
                 assert e.filename == "test"
             else:
                 assert False
+            try:
+                j(n)
+            except (IOError, OSError) as e:
+                assert e.errno == 0
+                assert e.strerror == "test"
+                assert e.filename is None
         self.interpret(f, [42])
 
     def test_catch_incompatible_class(self):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to