Author: Brian Kearns <[email protected]>
Branch: use-file-star-for-file
Changeset: r73167:00a18e4129fd
Date: 2014-08-29 10:41 -0400
http://bitbucket.org/pypy/pypy/changeset/00a18e4129fd/

Log:    improve these tests

diff --git a/pypy/module/_file/test/test_file.py 
b/pypy/module/_file/test/test_file.py
--- a/pypy/module/_file/test/test_file.py
+++ b/pypy/module/_file/test/test_file.py
@@ -87,10 +87,12 @@
             f.close()
 
     def test_badmode(self):
-        raises(ValueError, self.file, "foo", "bar")
+        exc = raises(ValueError, self.file, "foo", "bar")
+        assert str(exc.value) == "mode string must begin with one of 'r', 'w', 
'a' or 'U', not 'bar'"
 
     def test_wraposerror(self):
-        raises(IOError, self.file, "hopefully/not/existant.bar")
+        exc = raises(IOError, self.file, "hopefully/not/existant.bar")
+        assert str(exc.value) == "[Errno 2] No such file or directory: 
'hopefully/not/existant.bar'"
 
     def test_correct_file_mode(self):
         import os
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to