{ "info": { "author": "Tom Viner", "author_email": "code@viner.tv", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Testing" ], "description": "pytest-ast-back-to-python\n=========================\n\n.. image:: https://travis-ci.org/tomviner/pytest-ast-back-to-python.svg?branch=master\n :target: https://travis-ci.org/tomviner/pytest-ast-back-to-python\n :alt: See Build Status on Travis CI\n\n.. image:: https://ci.appveyor.com/api/projects/status/github/tomviner/pytest-ast-back-to-python?branch=master\n :target: https://ci.appveyor.com/project/tomviner/pytest-ast-back-to-python/branch/master\n :alt: See Build Status on AppVeyor\n\nA plugin for pytest devs to view how assertion rewriting recodes the AST\n\n----\n\nFeatures\n--------\n\nPytest rewrites the AST (abstract syntax tree) of your tests, for the purpose of displaying the subexpressions involved in your assert statements. This plugin converts that rewritten AST back to Python source, and displays it.\n\n\nInstallation\n------------\n\nYou can install \"pytest-ast-back-to-python\" via `pip`_ from `PyPI`_::\n\n $ pip install pytest-ast-back-to-python\n\n\nUsage\n-----\n\n.. code-block:: bash\n\n py.test --show-ast-as-python\n\nExample\n-------\n\nTake a trivial test like:\n\n.. code-block:: python\n\n def test_simple():\n a = 1\n b = 2\n assert a + b == 3\n\nView the rewritten AST as Python like this:\n\n.. code-block:: bash\n\n $ py.test --show-ast-as-python test_simple.py\n ======================================== test session starts ========================================\n plugins: ast-back-to-python-0.1.0, cov-2.2.1\n collected 1 items\n\n test_simple.py .\n ======================================== Rewritten AST as Python ========================================\n import builtins as @py_builtins\n import _pytest.assertion.rewrite as @pytest_ar\n\n def test_simple():\n a = 1\n b = 2\n @py_assert2 = a + b\n @py_assert4 = 3\n @py_assert3 = @py_assert2 == @py_assert4\n if @py_assert3 is None:\n from _pytest.warning_types import PytestAssertRewriteWarning\n from warnings import warn_explicit\n warn_explicit(PytestAssertRewriteWarning('asserting the value None, please use \"assert is None\"'), category=None, filename='/home/tom/.virtualenvs/tmp-483cf04ecc31dda8/test_thing.py', lineno=4)\n if not @py_assert3:\n @py_format6 = @pytest_ar._call_reprcompare(('==',), (@py_assert3,), ('(%(py0)s + %(py1)s) == %(py5)s',), (@py_assert2, @py_assert4)) % {'py0': @pytest_ar._saferepr(a) if 'a' in @py_builtins.locals() or @pytest_ar._should_repr_global_name(a) else 'a', 'py1': @pytest_ar._saferepr(b) if 'b' in @py_builtins.locals() or @pytest_ar._should_repr_global_name(b) else 'b', 'py5': @pytest_ar._saferepr(@py_assert4)}\n @py_format8 = ('' + 'assert %(py7)s') % {'py7': @py_format6}\n raise AssertionError(@pytest_ar._format_explanation(@py_format8))\n @py_assert2 = @py_assert3 = @py_assert4 = None\n\n\nContributing\n------------\nContributions are very welcome. Tests can be run with `tox`_, please ensure\nthe coverage at least stays the same before you submit a pull request.\n\nLicense\n-------\n\nDistributed under the terms of the `BSD-3`_ license, \"pytest-ast-back-to-python\" is free and open source software\n\n\nThis `Pytest`_ plugin was generated with `Cookiecutter`_ along with `@hackebrot`_'s `Cookiecutter-pytest-plugin`_ template.\n\nIssues\n------\n\nIf you encounter any problems, please `file an issue`_ along with a detailed description.\n\n.. _`Cookiecutter`: https://github.com/audreyr/cookiecutter\n.. _`@hackebrot`: https://github.com/hackebrot\n.. _`MIT`: http://opensource.org/licenses/MIT\n.. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause\n.. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt\n.. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0\n.. _`cookiecutter-pytest-plugin`: https://github.com/pytest-dev/cookiecutter-pytest-plugin\n.. _`file an issue`: https://github.com/tomviner/pytest-ast-back-to-python/issues\n.. _`pytest`: https://github.com/pytest-dev/pytest\n.. _`tox`: https://tox.readthedocs.org/en/latest/\n.. _`pip`: https://pypi.python.org/pypi/pip/\n.. _`PyPI`: https://pypi.python.org/pypi\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tomviner/pytest-ast-back-to-python", "keywords": "", "license": "BSD-3", "maintainer": "", "maintainer_email": "", "name": "pytest-ast-back-to-python", "package_url": "https://pypi.org/project/pytest-ast-back-to-python/", "platform": "", "project_url": "https://pypi.org/project/pytest-ast-back-to-python/", "project_urls": { "Homepage": "https://github.com/tomviner/pytest-ast-back-to-python" }, "release_url": "https://pypi.org/project/pytest-ast-back-to-python/1.2.1/", "requires_dist": null, "requires_python": "", "summary": "A plugin for pytest devs to view how assertion rewriting recodes the AST", "version": "1.2.1" }, "last_serial": 5901073, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "e4c718a9b1791c9b5e1e4a5e69b7dadb", "sha256": "32088340ec5fb006366e80f5cb90b83111690b47b792eeb16b22c2df71b58558" }, "downloads": -1, "filename": "pytest_ast_back_to_python-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e4c718a9b1791c9b5e1e4a5e69b7dadb", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 14605, "upload_time": "2016-02-21T21:02:20", "url": "https://files.pythonhosted.org/packages/94/68/95258b44011394f612ac0da423e1452246048b47eb800e8faed223596bdd/pytest_ast_back_to_python-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4d620d2d833b568e6ea1d923b3145b8c", "sha256": "d1752cd17881027c95ddcf0c1f1af7ed17f5a9ac04f8333e096f912263ff3907" }, "downloads": -1, "filename": "pytest-ast-back-to-python-0.1.0.tar.gz", "has_sig": false, "md5_digest": "4d620d2d833b568e6ea1d923b3145b8c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11544, "upload_time": "2016-02-21T21:02:04", "url": "https://files.pythonhosted.org/packages/96/e0/84cff3bc54263670ff405a3546940cb049a9d12452d1e28539e2a8a9b012/pytest-ast-back-to-python-0.1.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "c9d47632e851dc5f470d1ef74059cf95", "sha256": "0a0b3bc30538658b343385d61c5abb585b23b06324bf6ae4ac86b5d916f4d55c" }, "downloads": -1, "filename": "pytest_ast_back_to_python-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c9d47632e851dc5f470d1ef74059cf95", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 14623, "upload_time": "2017-01-12T20:47:32", "url": "https://files.pythonhosted.org/packages/c9/35/6cf4b3d5f321ff678694f4f3bb09a1ec3975fca17d2cb55890e49a37d68d/pytest_ast_back_to_python-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fef857764115e75cf1f5f6136e737fe8", "sha256": "a9bb77051ada13ffaa0c172d11a059d26ddb4e2f2b191f074123b307b8760bcd" }, "downloads": -1, "filename": "pytest-ast-back-to-python-1.0.0.tar.gz", "has_sig": false, "md5_digest": "fef857764115e75cf1f5f6136e737fe8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13284, "upload_time": "2017-01-12T20:47:30", "url": "https://files.pythonhosted.org/packages/27/82/b077f99d118dc26aa42b8d9dbf65eb813b56a1b84edc08737446ceecbc4b/pytest-ast-back-to-python-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "051a6eb38bae99220f9b755177f61893", "sha256": "9913ff3d2f6e3cc3995b5af93dfced69ee3ee29ab06c6b35e548fc8642bc140f" }, "downloads": -1, "filename": "pytest_ast_back_to_python-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "051a6eb38bae99220f9b755177f61893", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 14629, "upload_time": "2017-01-13T19:57:31", "url": "https://files.pythonhosted.org/packages/82/ad/aa69edf400b13bcfe8b815ca97ad349abfda561c066639b5a38f8cf3caff/pytest_ast_back_to_python-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9d900c1a5e5299dab897e3ac00a0a1b9", "sha256": "c459b3ea9b0a41f2cdf6c80b7642db1ee40d74b98b58434749932190b82c2e4e" }, "downloads": -1, "filename": "pytest-ast-back-to-python-1.0.1.tar.gz", "has_sig": false, "md5_digest": "9d900c1a5e5299dab897e3ac00a0a1b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13288, "upload_time": "2017-01-13T19:57:28", "url": "https://files.pythonhosted.org/packages/52/7c/3d6f8121b9199258d0bb606f7648a403f697e4f8a5e907036675a52f404d/pytest-ast-back-to-python-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "7dbeb0ad598eed9716cb5c7f51905f76", "sha256": "94ba1cc8cd65ed7229a2faaf58feb5b619345670d5d2251ed4970cbdde3b135b" }, "downloads": -1, "filename": "pytest_ast_back_to_python-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7dbeb0ad598eed9716cb5c7f51905f76", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 14639, "upload_time": "2017-10-19T20:01:34", "url": "https://files.pythonhosted.org/packages/3a/0c/a5b0fa61f19031fe7c284372a33648af3722f56522251ff52b4acd195280/pytest_ast_back_to_python-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f0cb7fbfdf07b628454d590ec705a739", "sha256": "c138070585d2e89b85dee8f7470069e149ee3552030144e769541cdb529dee14" }, "downloads": -1, "filename": "pytest-ast-back-to-python-1.1.0.tar.gz", "has_sig": false, "md5_digest": "f0cb7fbfdf07b628454d590ec705a739", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15420, "upload_time": "2017-10-19T20:01:31", "url": "https://files.pythonhosted.org/packages/24/7e/ba8d2add96f74b4aa3520d8d89411f5167bf61e3105e3060b8c6131c5bdb/pytest-ast-back-to-python-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "439f31fe3eb044d8d0698748d0663729", "sha256": "7bfa190c42e0ea34b81545e2fcbd5384aad3297736504644900e0ef9964e94e2" }, "downloads": -1, "filename": "pytest_ast_back_to_python-1.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "439f31fe3eb044d8d0698748d0663729", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 13233, "upload_time": "2019-09-29T00:04:06", "url": "https://files.pythonhosted.org/packages/2c/37/ed88a5bec18d81f3353f0622baa95994d359d4b5abba02099ac83e384228/pytest_ast_back_to_python-1.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0ffc490f5a06de5e96c3ea7de04775cd", "sha256": "cbd729efb6e1038f2df3bdef67fead8ff461591c603df573b3dd3e7389299100" }, "downloads": -1, "filename": "pytest-ast-back-to-python-1.2.0.tar.gz", "has_sig": false, "md5_digest": "0ffc490f5a06de5e96c3ea7de04775cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15480, "upload_time": "2019-09-29T00:04:04", "url": "https://files.pythonhosted.org/packages/6c/e4/b837225221c456d9890a96c8bb1872c297b5c6f0282c35ec19d2b0798998/pytest-ast-back-to-python-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "24ae65f3cd30bd164dda7ca6f26510ff", "sha256": "1a019c3f3a646572f63b53069ce24efed678b8abdacf67259ae7118ca09e78a9" }, "downloads": -1, "filename": "pytest_ast_back_to_python-1.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "24ae65f3cd30bd164dda7ca6f26510ff", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 13409, "upload_time": "2019-09-29T00:08:17", "url": "https://files.pythonhosted.org/packages/10/f1/a74fb82f95cd4603179f4db79bdcdd00bd4cfe88bba344ececa750599dab/pytest_ast_back_to_python-1.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ef4b2364028c0efb05c6fe506b909749", "sha256": "1e594728637d0d03f639b91dc6afdb03f90dd8ccf783ec714545f18d0e9232dc" }, "downloads": -1, "filename": "pytest-ast-back-to-python-1.2.1.tar.gz", "has_sig": false, "md5_digest": "ef4b2364028c0efb05c6fe506b909749", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15825, "upload_time": "2019-09-29T00:08:14", "url": "https://files.pythonhosted.org/packages/2b/fe/5788791ddfdcdebf1ecb4d1b0e95c00009b4bd75cd5218f0df9f5d6fb2e4/pytest-ast-back-to-python-1.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "24ae65f3cd30bd164dda7ca6f26510ff", "sha256": "1a019c3f3a646572f63b53069ce24efed678b8abdacf67259ae7118ca09e78a9" }, "downloads": -1, "filename": "pytest_ast_back_to_python-1.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "24ae65f3cd30bd164dda7ca6f26510ff", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 13409, "upload_time": "2019-09-29T00:08:17", "url": "https://files.pythonhosted.org/packages/10/f1/a74fb82f95cd4603179f4db79bdcdd00bd4cfe88bba344ececa750599dab/pytest_ast_back_to_python-1.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ef4b2364028c0efb05c6fe506b909749", "sha256": "1e594728637d0d03f639b91dc6afdb03f90dd8ccf783ec714545f18d0e9232dc" }, "downloads": -1, "filename": "pytest-ast-back-to-python-1.2.1.tar.gz", "has_sig": false, "md5_digest": "ef4b2364028c0efb05c6fe506b909749", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15825, "upload_time": "2019-09-29T00:08:14", "url": "https://files.pythonhosted.org/packages/2b/fe/5788791ddfdcdebf1ecb4d1b0e95c00009b4bd75cd5218f0df9f5d6fb2e4/pytest-ast-back-to-python-1.2.1.tar.gz" } ] }