Author: Armin Rigo <[email protected]>
Branch:
Changeset: r69712:1273570cb7ad
Date: 2014-03-05 10:33 +0100
http://bitbucket.org/pypy/pypy/changeset/1273570cb7ad/
Log: Duplicate the tests to also run in a plain ascii mode. Useful
because I can't find a machine which doesn't just skip all these
tests with "encoding not good enough".
diff --git a/rpython/rlib/test/test_rposix.py b/rpython/rlib/test/test_rposix.py
--- a/rpython/rlib/test/test_rposix.py
+++ b/rpython/rlib/test/test_rposix.py
@@ -25,10 +25,9 @@
def as_unicode(self):
return self.unistr
-class TestPosixUnicode:
+class BasePosixUnicode:
def setup_method(self, method):
- self.ufilename = (unicode(udir.join('test_open')) +
- u'\u65e5\u672c.txt') # "Japan"
+ self.ufilename = self._get_filename()
try:
f = file(self.ufilename, 'w')
except UnicodeEncodeError:
@@ -148,3 +147,13 @@
rposix.unsetenv(self.path)
interpret(f, []) # does not crash
+
+
+class TestPosixAscii(BasePosixUnicode):
+ def _get_filename(self):
+ return str(udir.join('test_open_ascii'))
+
+class TestPosixUnicode(BasePosixUnicode):
+ def _get_filename(self):
+ return (unicode(udir.join('test_open')) +
+ u'\u65e5\u672c.txt') # "Japan"
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit