{ "info": { "author": "James Laska", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT 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.6", "Topic :: Software Development :: Quality Assurance", "Topic :: Software Development :: Testing", "Topic :: Utilities" ], "description": "pytest-github\n=============\n\n`Build Status `__ `Coverage\nStatus `__ `Requirements\nStatus `__\n`Version `__\n`License `__ `Supported\nPython Versions `__\n\nPlugin for py.test that integrates with github using markers.\nIntegration allows tests to xfail (or skip) based on the status of\nlinked github issues.\n\nInstallation\n------------\n\nInstall the plugin using ``pip``\n\n.. code:: bash\n\n pip install pytest-github\n\nUsage\n-----\n\n1. Once installed, the following ``py.test`` command-line parameters are\n available.\n\n.. code:: bash\n\n py.test \\\n [--github-cfg=GITHUB_CFG] \\\n [--github-username=GITHUB_USERNAME] \\\n [--github-token=GITHUB_TOKEN] \\\n [--github-completed=GITHUB_COMPLETED] \\\n [--github-summary]\n\n2. Next, create a configure file called ``github.yml`` that contains\n your GitHub username and `personal api\n token `__. A sample\n file is included below.\n\n.. code:: yaml\n\n github:\n username: j.doe\n token: XXXXXXXXXXXXX\n\nMarker\n~~~~~~\n\nThe following ``py.test`` marker is available:\n\n.. code:: python\n\n @pytest.mark.github(*args): GitHub issue integration\n\nThe marker can be used to influence the outcome of tests. See the\nexamples below for guidance.\n\nExample: xfail\n~~~~~~~~~~~~~~\n\nOften, when a test fails, one might file a GitHub issue to track the\nresolution of the problem. Alternatively, you could use the built-in\n``xfail`` marker. This is where ``pytest-github`` can be of use. To\navoid having to review known failures with each test run, and to avoid\nalways using ``xfail``, consider the ``github`` marker to dynamically\ninfluence the test outcome based on the state of the GitHub issue.\n\nThe following example demonstrates using the ``github`` marker to\ninfluence the outcome of a known failing test.\n\n.. code:: python\n\n @pytest.mark.github('https://github.com/some/open/issues/1')\n def test_will_xfail():\n assert False\n\nRunning this test with ``py.test`` will produce the following output:\n\n.. code:: bash\n\n test.py::test_will_xfail xfail\n\nExample: Anticipating specific exceptions with the \u2018raises\u2019 keyword\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo avoid masking additional failures that might be uncovered by a test\nwhile a github issue is being resolved, you can restrict expected\nfailures to specific exceptions using the ``raises`` keyword argument:\n\n.. code:: python\n\n @pytest.mark.github('https://github.com/some/open/issues/1', raises=ZeroDivisionError)\n def test_will_xfail():\n foo = 1/0\n\n\n @pytest.mark.github('https://github.com/some/open/issues/1', raises=ValueError)\n def test_will_fail():\n # This test has been marked with an open issue but it will still fail\n # because the exception raised is different from the one indicated by\n # the 'raises' keyword.\n foo = 1/0\n\nRunning this test with ``py.test`` will produce the following output:\n\n.. code:: bash\n\n collected 2 items\n collected 1 github issues\n\n test.py::test_will_xfail xfail\n test.py::test_will_fail FAILED\n\nExample: XPASS\n~~~~~~~~~~~~~~\n\nThe following example demonstrates a test that succeeds, despite being\nassociated with an *open* GitHub issue.\n\n.. code:: python\n\n @pytest.mark.github('https://github.com/some/open/issues/1')\n def test_will_xpass():\n assert True\n\nIn this example, the ``XPASS`` outcome (a.k.a. unexpected pass) is used.\n\n::\n\n test.py::test_will_xpass XPASS\n\nExample: PASSED\n~~~~~~~~~~~~~~~\n\nThe following example demonstrates a test that succeeds, while it is\nassociated with a *closed* GitHub issue. When a test associated with a\nGitHub\n\n.. code:: python\n\n @pytest.mark.github('https://github.com/some/closed/issues/2')\n def test_will_pass():\n assert True\n\nIn this example, the ``PASSED`` outcome is used.\n\n::\n\n test.py::test_will_pass PASSED\n\nExample: FAILED\n~~~~~~~~~~~~~~~\n\nThe following example demonstrates a test that fails, while it is\nassociated with a *closed* GitHub issue.\n\n.. code:: python\n\n @pytest.mark.github('https://github.com/some/closed/issues/2')\n def test_will_fail():\n assert False\n\nIn this example, the ``FAILED`` outcome is used.\n\n::\n\n test.py::test_will_fail FAILED\n\nExample: SKIPPED\n~~~~~~~~~~~~~~~~\n\nThe following example demonstrates a test that fails, while it is\nassociated with an *open* GitHub issue.\n\n.. code:: python\n\n @pytest.mark.github('https://github.com/some/open/issues/1', skip=True)\n def test_will_skip():\n assert False\n\nIn this example, the ``SKIPPED`` outcome is used.\n\n::\n\n test.py::test_will_skip SKIPPED\n\nIn this example, the ``SKIPPED`` outcome is used.\n\n::\n\n test.py::test_will_skip SKIPPED\n\nExample: IDS\n~~~~~~~~~~~~\n\nThe following example demonstrates a parametrize test that uses the\n``github`` marker to influence the outcome of a subset of the known\nfailing test.\n\n.. code:: python\n\n @pytest.mark.github('https://github.com/some/open/issues/1', ids=['even2', 'even4'])\n @pytest.mark.parametrize(\"count\", [1, 2, 3, 4], ids=[\"odd1\", \"even2\", \"odd3\", \"even4\"])\n def test_will_xfail(count):\n assert count % 2\n\nSummary of GitHub markers and their associated tests\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe ``--github-summary`` option lists all GitHub issues referenced by a\n``github`` marker. The list is divided into two sections,\n``Resolved Issues`` and ``Unresolved Issues``, where an issue is\nconsidered resolved if it has one of the ``GITHUB_COMPLETED`` labels.\nBeneath each issue is a listing of all tests that reference the issue.\n\nSample output:\n\n::\n\n Unresolved Issues\n https://github.com/repo/open/issues/1\n - test_suite.py:test_foo\n https://github.com/repo/open/issues/2\n - test_suite.py:test_bar\n\n Resolved Issues\n https://github.com/repo/open/issues/3\n - test_suite.py:test_baz\n - test_suite.py:test_bah", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/jlaska/pytest-github", "keywords": "py.test pytest testing github issues", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pytest-github", "package_url": "https://pypi.org/project/pytest-github/", "platform": "any", "project_url": "https://pypi.org/project/pytest-github/", "project_urls": { "Homepage": "http://github.com/jlaska/pytest-github" }, "release_url": "https://pypi.org/project/pytest-github/0.3.1/", "requires_dist": null, "requires_python": "", "summary": "Plugin for py.test that associates tests with github issues using a marker.", "version": "0.3.1" }, "last_serial": 4911211, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "bceddd97923d067b087867f5fb499a6e", "sha256": "4e906fe088777a62f6096a826ebd359b01f1f5cf876e9e90da06aa0309da3f69" }, "downloads": -1, "filename": "pytest-github-0.0.1.tar.gz", "has_sig": false, "md5_digest": "bceddd97923d067b087867f5fb499a6e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6491, "upload_time": "2016-02-19T00:25:05", "url": "https://files.pythonhosted.org/packages/d1/3d/53bc93d4b62d9e4b9d68a680e8e5f48615d0416699a1564194002c43dbd8/pytest-github-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "b5a6287b56f0e8b86be4a890d8721c72", "sha256": "a19b779c37570ad42558d7b128a713c4387445bf3837eb79133223b7642bebe4" }, "downloads": -1, "filename": "pytest-github-0.0.2.tar.gz", "has_sig": false, "md5_digest": "b5a6287b56f0e8b86be4a890d8721c72", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6648, "upload_time": "2016-02-19T00:31:41", "url": "https://files.pythonhosted.org/packages/20/6b/c192f4fb52cc60e795caa4df59057f89ece3e6a7d5cfc2ef7ea36c8fc3e7/pytest-github-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "9746eac46c266ee973e06a3cad3a5412", "sha256": "80da7093eaea5f35663874381534b4fcffc79e758232edee3aee0494821f9b6d" }, "downloads": -1, "filename": "pytest-github-0.0.3.tar.gz", "has_sig": false, "md5_digest": "9746eac46c266ee973e06a3cad3a5412", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8135, "upload_time": "2016-03-03T23:23:35", "url": "https://files.pythonhosted.org/packages/08/fe/3047221f64863ef0c2203e11cad959b4acc69b38c4053aa01320c5f18f54/pytest-github-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "148dea4a47f3d31e6f52b9e691f0e655", "sha256": "79cee86b75405cbf363e606e6af5f5edbd318979226c1c6831d5941f5d7d54b9" }, "downloads": -1, "filename": "pytest-github-0.0.4.tar.gz", "has_sig": false, "md5_digest": "148dea4a47f3d31e6f52b9e691f0e655", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8050, "upload_time": "2016-03-17T16:14:29", "url": "https://files.pythonhosted.org/packages/47/c4/b4265e5e0d267c882114a910b2d5778b32a8bfd32744c246287ca157e0d5/pytest-github-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "236a40ea5d992d2d28a1ab3c3ca7b6f5", "sha256": "b8bd038e55706240af5b623b943c75958c43dde64be0a72525e19a6859910ad5" }, "downloads": -1, "filename": "pytest-github-0.0.5.tar.gz", "has_sig": false, "md5_digest": "236a40ea5d992d2d28a1ab3c3ca7b6f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8143, "upload_time": "2016-04-04T18:23:37", "url": "https://files.pythonhosted.org/packages/fa/0b/def045e950c651e0db37e45336fad7a4ba92bdbd68b2e61f33ba5eaa45f8/pytest-github-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "2db19c97e8b3fd0303bfe69282ed94ac", "sha256": "4afcdef880b812441187e3f6c7bf949e51f65720234ffd86bd96833827b56001" }, "downloads": -1, "filename": "pytest-github-0.0.6.tar.gz", "has_sig": false, "md5_digest": "2db19c97e8b3fd0303bfe69282ed94ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8277, "upload_time": "2016-04-18T19:18:35", "url": "https://files.pythonhosted.org/packages/a7/d7/feb126cc3302ac24c17cd0bc88b2193c2a92442a4992c5b86bbd2f4aafa3/pytest-github-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "9946f68eb8918993ad32faa5dfd7385c", "sha256": "7582157d248d63e0e56686080f47b3bed88cee781d1c1cdeb75db2c88af7dd31" }, "downloads": -1, "filename": "pytest-github-0.0.7.tar.gz", "has_sig": false, "md5_digest": "9946f68eb8918993ad32faa5dfd7385c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8176, "upload_time": "2016-04-29T20:28:40", "url": "https://files.pythonhosted.org/packages/73/b6/af75a700bf579a069583c5e2b17afd5256772786230e262426185d26f67d/pytest-github-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "be9e72812b390b2a0b6e1bb937dba369", "sha256": "8b3e1418796e1c68c0e45ca17fa3cb510cfbfcfddc507252f446e230270d19f3" }, "downloads": -1, "filename": "pytest-github-0.0.8.tar.gz", "has_sig": false, "md5_digest": "be9e72812b390b2a0b6e1bb937dba369", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8215, "upload_time": "2016-08-02T13:26:07", "url": "https://files.pythonhosted.org/packages/94/2c/312171c1193362c71cbeceea57b5d9c1d12e0bd7da42207c3c3d7068fc51/pytest-github-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "8f78f11bc3e603134b5fab9812ac1780", "sha256": "1817a402f1fa194c25b039d0bf785a0b29f9decb4cb5a98a85066b7799316c47" }, "downloads": -1, "filename": "pytest-github-0.0.9.tar.gz", "has_sig": false, "md5_digest": "8f78f11bc3e603134b5fab9812ac1780", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8540, "upload_time": "2018-03-16T18:51:12", "url": "https://files.pythonhosted.org/packages/80/02/1b3683fa0603ab636d57546c0c41dd98ff906cceb144c6c49cdb480cfc03/pytest-github-0.0.9.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "1117b5244adf8d6d4028d1b2c011660b", "sha256": "29ed87ee12a648a8f8d8917e6550e7f8295272b03106d616f55377d58c1b4041" }, "downloads": -1, "filename": "pytest-github-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1117b5244adf8d6d4028d1b2c011660b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8740, "upload_time": "2018-05-02T15:58:54", "url": "https://files.pythonhosted.org/packages/cd/3d/e8d338630eb3739e18bc835f1ee457df7dfab29b9ac0d81b5abe2046432a/pytest-github-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "96ba69cb0f30c5e84e5801df111e2646", "sha256": "b5ad08d5570ffe397e80bc46428c2873f511e34c8dcf5c71484c45a6e5d0c507" }, "downloads": -1, "filename": "pytest-github-0.2.0.tar.gz", "has_sig": false, "md5_digest": "96ba69cb0f30c5e84e5801df111e2646", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9357, "upload_time": "2018-07-12T15:03:45", "url": "https://files.pythonhosted.org/packages/89/aa/1d2e3b4b3292201ffa334503e383e3445cdb1d31eba71789b39067272f96/pytest-github-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "213ef1e0a0f8badbc43b443b72fced9c", "sha256": "3140777812d4b793588431bab72d1eceae461c6355bb8397ea48a15ccf2f9393" }, "downloads": -1, "filename": "pytest-github-0.3.0.tar.gz", "has_sig": false, "md5_digest": "213ef1e0a0f8badbc43b443b72fced9c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9436, "upload_time": "2018-12-14T15:26:48", "url": "https://files.pythonhosted.org/packages/00/4b/1a9eb52347518915be92f0a0342102dbeec2ea4cb5e4400b53454d99ecac/pytest-github-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "38c722791df9f7838f361f3fad65706e", "sha256": "1e0bcf6d24bd4eef867a78104d702cfbe5ffcb9e6a14c245d0bb1004803c0ffd" }, "downloads": -1, "filename": "pytest-github-0.3.1.tar.gz", "has_sig": false, "md5_digest": "38c722791df9f7838f361f3fad65706e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9631, "upload_time": "2019-03-07T15:47:36", "url": "https://files.pythonhosted.org/packages/21/54/28216ab352978154e749925d9924be187ec84990158b50471c788319c160/pytest-github-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "38c722791df9f7838f361f3fad65706e", "sha256": "1e0bcf6d24bd4eef867a78104d702cfbe5ffcb9e6a14c245d0bb1004803c0ffd" }, "downloads": -1, "filename": "pytest-github-0.3.1.tar.gz", "has_sig": false, "md5_digest": "38c722791df9f7838f361f3fad65706e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9631, "upload_time": "2019-03-07T15:47:36", "url": "https://files.pythonhosted.org/packages/21/54/28216ab352978154e749925d9924be187ec84990158b50471c788319c160/pytest-github-0.3.1.tar.gz" } ] }