[pypy-svn] r16148 - pypy/dist/pypy/module/_codecs/test

arigo at codespeak.net arigo at codespeak.net
Thu Aug 18 18:02:22 CEST 2005


Author: arigo
Date: Thu Aug 18 18:02:22 2005
New Revision: 16148

Modified:
   pypy/dist/pypy/module/_codecs/test/test_codecs.py
Log:
The string_escape codec is still broken.  See tests and especially the comments
in the tests.



Modified: pypy/dist/pypy/module/_codecs/test/test_codecs.py
==============================================================================
--- pypy/dist/pypy/module/_codecs/test/test_codecs.py	(original)
+++ pypy/dist/pypy/module/_codecs/test/test_codecs.py	Thu Aug 18 18:02:22 2005
@@ -41,9 +41,15 @@
         assert u"\u0663".encode("raw-unicode-escape") == "\u0663"
 
     def test_escape_decode(self):
+        skip("XXX fix the string_escape codecs (see comments in the tset)")
+        # XXX comments:
+        #   - string_escape does not support \u and \U at all
+        #   - this sequence of 'if' statements should be 'elif', otherwise
+        #      two cases can mix with each other
+        #   - see more tests below
         test = 'a\n\\b\x00c\td\u2045'.encode('string_escape')
         assert test.decode('string_escape') =='a\n\\b\x00c\td\u2045'
-       # skip("string_escape has open bugs")
         assert '\\077'.decode('string_escape') == '?'
-        assert '\\u1234'.decode('string_escape') == '\u1234'
-        assert '\\x41u1234'.decode('string_escape') == 'Au1234'
+        assert '\\100'.decode('string_escape') == '@'
+        assert '\\253'.decode('string_escape') == chr(0253)
+        assert '\\312'.decode('string_escape') == chr(0312)



More information about the Pypy-commit mailing list