{ "info": { "author": "Zach \"theY4Kman\" Kanzler", "author_email": "they4kman@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Pytest" ], "description": "pytest-only\n===========\n\nOnly run tests marked with ``@pytest.mark.only``. If none are marked, all tests run as usual.\n\nBorrowed from `mocha `_.\n\n\nInstallation\n------------\n\n.. code-block:: bash\n\n pip install pytest-only\n\n\nUsage\n-----\n\nUse it on functions\n\n.. code-block:: python\n\n import pytest\n\n def test_that_will_not_run():\n assert 0\n\n @pytest.mark.only\n def test_that_will_run():\n assert 1\n\n\n.. code-block:: bash\n\n $ py.test -v test_example.py\n\n ============================= test session starts ==============================\n platform linux -- Python 3.6.1, pytest-3.0.7, py-1.4.33, pluggy-0.4.0 -- /tmp/example/bin/python3.6\n cachedir: .cache\n rootdir: /tmp/example, inifile:\n plugins: only-1.0.0\n collected 2 items\n\n test_example.py::test_that_will_run PASSED\n\n =========================== 1 passed in 0.00 seconds ===========================\n\n\nOr use it on classes\n\n.. code-block:: python\n\n import pytest\n\n class TestThatWillNotRun:\n def test_that_will_not_run(self):\n assert 0\n\n\n @pytest.mark.only\n class TestThatWillRun:\n def test_that_will_run(self):\n assert 1\n\n\n.. code-block:: bash\n\n $ py.test -v test_example.py\n\n ============================= test session starts ==============================\n platform linux -- Python 3.6.1, pytest-3.0.7, py-1.4.33, pluggy-0.4.0 -- /tmp/example/bin/python3.6\n cachedir: .cache\n rootdir: /tmp/example, inifile:\n plugins: only-1.0.0\n collected 2 items\n\n test_example.py::TestThatWillRun::test_that_will_run PASSED\n\n =========================== 1 passed in 0.00 seconds ===========================\n\n\nOr use it on modules\n\n.. code-block:: python\n\n # test_example.py\n import pytest\n\n pytestmark = pytest.mark.only\n\n def test_that_will_run():\n assert 1\n\n\n.. code-block:: python\n\n # test_example2.py\n def test_that_will_not_run():\n assert 0\n\n\n.. code-block:: bash\n\n $ py.test -v test_example.py test_example2.py\n\n ============================= test session starts ==============================\n platform linux -- Python 3.6.1, pytest-3.0.7, py-1.4.33, pluggy-0.4.0 -- /home/they4kman/.virtualenvs/tmp-53d5944c7c78d28/bin/python3.6\n cachedir: .cache\n rootdir: /home/they4kman/.virtualenvs/tmp-53d5944c7c78d28, inifile:\n plugins: only-1.0.0\n collected 2 items\n\n test_example.py::test_that_will_run PASSED\n\n =========================== 1 passed in 0.00 seconds ===========================\n\n\n\nDisable for single test run\n---------------------------\n\nTo run all the tests, regardless of whether ``@pytest.mark.only`` is used, pass\nthe ``--no-only`` flag to pytest:\n\n.. code-block:: bash\n\n $ py.test --no-only\n\n\nIf ``--no-only`` has already been passed (perhaps by way of ``addopts`` in\n*pytest.ini*), use the ``--only`` flag to re-enable it:\n\n.. code-block:: bash\n\n $ py.test --no-only --only\n\n\nDevelopment\n-----------\n\n1. Install the test/dev requirements\n\n .. code-block:: bash\n\n $ pip install -r dev-requirements.txt\n\n2. Run the tests\n\n .. code-block:: bash\n\n $ py.test\n\n3. Run the tests on all currently-supported platforms\n\n .. code-block:: bash\n\n $ tox", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/theY4Kman/pytest-only", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pytest-only", "package_url": "https://pypi.org/project/pytest-only/", "platform": "", "project_url": "https://pypi.org/project/pytest-only/", "project_urls": { "Homepage": "https://github.com/theY4Kman/pytest-only" }, "release_url": "https://pypi.org/project/pytest-only/1.2.1/", "requires_dist": null, "requires_python": "", "summary": "Use @pytest.mark.only to run a single test", "version": "1.2.1" }, "last_serial": 4703836, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "edfce3d0b330d2b8aefe3059f4a6ce16", "sha256": "5e33341aaa309d6463d205be745a2a7c6d721f6f93eb6c3bac58240e8ecfabf0" }, "downloads": -1, "filename": "pytest-only-1.0.0.tar.gz", "has_sig": false, "md5_digest": "edfce3d0b330d2b8aefe3059f4a6ce16", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2054, "upload_time": "2017-03-28T01:07:42", "url": "https://files.pythonhosted.org/packages/31/a3/c8c3f03d3b02962c5907ad30bcbfe6aaa5884ac83649862fc829a5088a17/pytest-only-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "b927044a19af8676800dcc873b1ad24e", "sha256": "e6eaf499a927e3b3f9b0d8e56677095dac9a427a8abeb77cfbe9348f34f49253" }, "downloads": -1, "filename": "pytest-only-1.0.1.tar.gz", "has_sig": false, "md5_digest": "b927044a19af8676800dcc873b1ad24e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2096, "upload_time": "2017-03-28T03:01:45", "url": "https://files.pythonhosted.org/packages/23/0d/7e70ac6812730d16eca8e041617d7c2a055b10f0cc0d008b5db34cfddd82/pytest-only-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "2a61d611282331137933a6510207f73d", "sha256": "9f4ee246c6829a730f8f6483c3398d2825be7ecbbdf1d46d50de6322444f19da" }, "downloads": -1, "filename": "pytest-only-1.1.0.tar.gz", "has_sig": false, "md5_digest": "2a61d611282331137933a6510207f73d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2161, "upload_time": "2017-03-28T11:25:53", "url": "https://files.pythonhosted.org/packages/e6/7b/2dc703dd555a301c1e7309d7ccc03c073f83a3f0411177b8cb1c82ecb13c/pytest-only-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "f15d7d955fef0728db99d8db0c051d78", "sha256": "1c5cb3bb6fd87e890fd1db85d46925840392353a3fe5bcfb2f423bc6536ba545" }, "downloads": -1, "filename": "pytest-only-1.2.0.tar.gz", "has_sig": false, "md5_digest": "f15d7d955fef0728db99d8db0c051d78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2654, "upload_time": "2018-12-24T00:12:14", "url": "https://files.pythonhosted.org/packages/f1/18/38913522ff00b828b917507892c5956962194ee18e34f58bd293782c1aec/pytest-only-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "63bbab8ea1179390f37c1ea7d53805eb", "sha256": "221d9c8094dde089d1c2dac6972ae2b47d95a8e13d5282e0289f8b27f06e3637" }, "downloads": -1, "filename": "pytest-only-1.2.1.tar.gz", "has_sig": false, "md5_digest": "63bbab8ea1179390f37c1ea7d53805eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3012, "upload_time": "2019-01-10T21:52:58", "url": "https://files.pythonhosted.org/packages/1e/06/3a4124b497151900ca943da7ab441b0bd9851fb27b644365a26b00abb732/pytest-only-1.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "63bbab8ea1179390f37c1ea7d53805eb", "sha256": "221d9c8094dde089d1c2dac6972ae2b47d95a8e13d5282e0289f8b27f06e3637" }, "downloads": -1, "filename": "pytest-only-1.2.1.tar.gz", "has_sig": false, "md5_digest": "63bbab8ea1179390f37c1ea7d53805eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3012, "upload_time": "2019-01-10T21:52:58", "url": "https://files.pythonhosted.org/packages/1e/06/3a4124b497151900ca943da7ab441b0bd9851fb27b644365a26b00abb732/pytest-only-1.2.1.tar.gz" } ] }