[pypy-commit] pypy py3k: Restore this test, str._formatter_parser is now in the _string module.

amauryfa noreply at buildbot.pypy.org
Wed Mar 14 21:06:05 CET 2012


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r53597:3a460d5d5868
Date: 2012-03-14 21:05 +0100
http://bitbucket.org/pypy/pypy/changeset/3a460d5d5868/

Log:	Restore this test, str._formatter_parser is now in the _string
	module.

diff --git a/pypy/objspace/std/test/test_newformat.py b/pypy/objspace/std/test/test_newformat.py
--- a/pypy/objspace/std/test/test_newformat.py
+++ b/pypy/objspace/std/test/test_newformat.py
@@ -358,6 +358,13 @@
         for x in l[0]:
             assert isinstance(x, str)
 
+    def test_formatter_parser_escape(self):
+        import _string
+        l = list(_string.formatter_parser("{{a}}"))
+        assert l == [('{', None, None, None), ('a}', None, None, None)]
+        l = list(_string.formatter_parser("{{{{"))
+        assert l == [('{', None, None, None), ('{', None, None, None)]
+
     def test_formatter_field_name_split(self):
         import _string
         first, rest = _string.formatter_field_name_split('')


More information about the pypy-commit mailing list