Author: Ronan Lamy <ronan.l...@gmail.com> Branch: Changeset: r86607:05aa9435b133 Date: 2016-08-27 17:30 +0100 http://bitbucket.org/pypy/pypy/changeset/05aa9435b133/
Log: Small cleanup diff --git a/pypy/objspace/std/test/test_random_attr.py b/pypy/objspace/std/test/test_random_attr.py --- a/pypy/objspace/std/test/test_random_attr.py +++ b/pypy/objspace/std/test/test_random_attr.py @@ -2,6 +2,12 @@ import sys from pypy.tool.pytest.objspace import gettestobjspace try: + import __pypy__ +except ImportError: + pass +else: + pytest.skip("makes no sense under pypy!") +try: from hypothesis import given, strategies, settings except ImportError: pytest.skip("requires hypothesis") @@ -119,16 +125,9 @@ return "\n ".join(code) -@given(make_code()) +@given(code=make_code()) #@settings(max_examples=5000) -def test_random_attrs(code): - try: - import __pypy__ - except ImportError: - pass - else: - pytest.skip("makes no sense under pypy!") - space = gettestobjspace() +def test_random_attrs(code, space): print code exec "if 1:\n " + code space.appexec([], "():\n " + code) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit