Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r48005:565ca4631cdf
Date: 2011-10-13 01:08 +0200
http://bitbucket.org/pypy/pypy/changeset/565ca4631cdf/
Log: Add token.__all__, and fix applevel raises when a string is passed
to be compiled.
diff --git a/pypy/module/token/__init__.py b/pypy/module/token/__init__.py
--- a/pypy/module/token/__init__.py
+++ b/pypy/module/token/__init__.py
@@ -21,6 +21,8 @@
tok_name[id] = tok
Module.interpleveldefs["tok_name"] = "space.wrap(%r)" % (tok_name,)
Module.interpleveldefs["N_TOKENS"] = "space.wrap(%d)" % len(tok_name)
+ all_names = Module.interpleveldefs.keys()
+ Module.interpleveldefs["__all__"] = "space.wrap(%r)" % (all_names,)
_init_tokens()
diff --git a/pypy/tool/pytest/appsupport.py b/pypy/tool/pytest/appsupport.py
--- a/pypy/tool/pytest/appsupport.py
+++ b/pypy/tool/pytest/appsupport.py
@@ -213,7 +213,7 @@
def pypyraises(space, w_ExpectedException, w_expr, __args__):
"""A built-in function providing the equivalent of py.test.raises()."""
args_w, kwds_w = __args__.unpack()
- if space.is_true(space.isinstance(w_expr, space.w_str)):
+ if space.is_true(space.isinstance(w_expr, space.w_unicode)):
if args_w:
raise OperationError(space.w_TypeError,
space.wrap("raises() takes no argument "
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit