Author: Juergen Boemmels <[email protected]>
Branch:
Changeset: r5:324223d56732
Date: 2011-09-05 23:02 +0200
http://bitbucket.org/pypy/lang-scheme/changeset/324223d56732/
Log: Split tests for symbols & strings out of test_simple
diff --git a/scheme/test/test_parser.py b/scheme/test/test_parser.py
--- a/scheme/test/test_parser.py
+++ b/scheme/test/test_parser.py
@@ -39,8 +39,13 @@
w_fixnum = parse_sexpr('1123')
assert unwrap(w_fixnum) == 1123
assert isinstance(w_fixnum, W_Integer)
- w_fixnum = parse_sexpr('abfa__')
- assert isinstance(w_fixnum, W_Symbol)
+
+def test_symbol():
+ w_sym = parse_sexpr('abfa__')
+ assert isinstance(w_sym, W_Symbol)
+ assert w_sym.to_string() == 'abfa__'
+
+def test_string():
t = parse_sexpr(r'''"don't believe \"them\""''')
assert isinstance(t, W_String)
assert unwrap(t) == 'don\'t believe "them"'
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit