Author: Greg Price <pr...@mit.edu> Branch: signatures Changeset: r59318:668eb51df0be Date: 2012-12-02 18:01 -0800 http://bitbucket.org/pypy/pypy/changeset/668eb51df0be/
Log: Small rearrangement in test_signature for clarity diff --git a/pypy/rlib/test/test_signature.py b/pypy/rlib/test/test_signature.py --- a/pypy/rlib/test/test_signature.py +++ b/pypy/rlib/test/test_signature.py @@ -4,16 +4,6 @@ from pypy.translator.translator import TranslationContext, graphof -def test_signature_bookkeeping(): - @signature('x', 'y', returns='z') - def f(a, b): - return a + len(b) - f.foo = 'foo' - assert f._signature_ == (('x', 'y'), 'z') - assert f.func_name == 'f' - assert f.foo == 'foo' - assert f(1, 'hello') == 6 - def annotate_at(f): t = TranslationContext() a = t.buildannotator() @@ -33,6 +23,17 @@ exc = py.test.raises(Exception, annotate_at, caller).value assert caller.func_name in repr(exc.args) + +def test_signature_bookkeeping(): + @signature('x', 'y', returns='z') + def f(a, b): + return a + len(b) + f.foo = 'foo' + assert f._signature_ == (('x', 'y'), 'z') + assert f.func_name == 'f' + assert f.foo == 'foo' + assert f(1, 'hello') == 6 + def test_signature_basic(): @signature(types.int(), types.str(), returns=types.char()) def f(a, b): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit