{ "info": { "author": "megachweng", "author_email": "megachweng@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Testing" ], "description": "# Welcome to pytest-atomic\n[![PyPi version](https://img.shields.io/pypi/v/pytest-atomic.svg)](https://pypi.org/project/pytest-atomic/)\n![Python version](https://img.shields.io/pypi/pyversions/pytest-atomic.svg)\n[![Build Status](https://travis-ci.com/megachweng/pytest-atomic.svg?branch=master)](https://travis-ci.com/megachweng/pytest-atomic)\n[![codecov](https://codecov.io/gh/megachweng/pytest-atomic/branch/master/graph/badge.svg)](https://codecov.io/gh/megachweng/pytest-atomic) \n\nSkip rest of tests if previous test failed.\n\n## Requirements\n* pytest >= 3.10.0\n* python >= 3.6\n\n**Not compatible with Python2.x**\n\n## How to install\n`$ pip install pytest-atomic --upgrade`\n\n## Usage\n```ini\n# pytest.ini\n[pytest]\n[atomic]\nenable : true\nelectronic : true\n```\n## Options\n>**Notice!** [pytest]section must be included. \n>**Notice!** All options bellow must be under [atomic] section in pytest.ini.\n* enable : [true / false] default is false\n* electronic : [true / false] default is true \n## Example\n```python\nimport pytest\n\n@pytest.mark.atomic\ndef test_fn1():\n assert 0\n\ndef test_fn2():\n assert 0\n\nclass TestCls:\n @pytest.mark.atomic\n def test_1(self):\n assert 0\n @pytest.mark.electronic\n def test_2(self):\n assert 1\n def test_3(self):\n assert 0\n @pytest.mark.electronic\n def test_4(self):\n assert 1\n def test_5(self):\n assert 0\n\ndef test_fn3():\n assert 0\n@pytest.mark.atomic\ndef test_fn4():\n assert 0\ndef test_fn5():\n assert 0\n```\n\n```text\ntest_demo\n|____ test_fn1: Failed\n|____ test_fn2: Skipped\n|____ TestCls\n| |____ test_1 Failed\n| |____ test_2 Passed\n| |____ test_3 Skipped\n| |____ test_4 Passed\n| |____ test_5 Skipped\n|\n|____ test_fn3: Skipped\n|____ test_fn4: Failed\n|____ test_fn5: Skipped \n```\n\n## Contributing\nContributions are very welcome. Tests can be run with [tox](https://tox.readthedocs.io/en/latest/), please ensure\nthe coverage at least stays the same before you submit a pull request.\n\n## License\nDistributed under the terms of the [MIT](http://opensource.org/licenses/MIT) license, \"pytest-atomic\" is free and open source software\n\n\n## Known Issue\n* Mark a Test class directly seems not work, but you can mark the first of test method in that class.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/megachweng/pytest-atomic", "keywords": "", "license": "MIT", "maintainer": "megachweng", "maintainer_email": "megachweng@gmail.com", "name": "pytest-atomic", "package_url": "https://pypi.org/project/pytest-atomic/", "platform": "", "project_url": "https://pypi.org/project/pytest-atomic/", "project_urls": { "Homepage": "https://github.com/megachweng/pytest-atomic" }, "release_url": "https://pypi.org/project/pytest-atomic/2.0.0/", "requires_dist": null, "requires_python": ">=3.6.5", "summary": "Skip rest of tests if previous test failed.", "version": "2.0.0" }, "last_serial": 4522812, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "0f7e7cdcb51e74951848aa3f13d75828", "sha256": "5de4923908ae93188ebe74fe208fdd15b4e365d389e40b40f31f7f18e027b52b" }, "downloads": -1, "filename": "pytest_atomic-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "0f7e7cdcb51e74951848aa3f13d75828", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 2674, "upload_time": "2018-09-20T13:35:30", "url": "https://files.pythonhosted.org/packages/d5/eb/7a635beb4aaddff567485476da4e3489bbe44afce80138d2fcd7f71674b3/pytest_atomic-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5d46ae29ec02af3282652a18098f02a7", "sha256": "5b7b16cdf8796edaedec4d049bfbd2bf42291cc2d8b76a73c2e153b77ebbbcc7" }, "downloads": -1, "filename": "pytest-atomic-1.1.tar.gz", "has_sig": false, "md5_digest": "5d46ae29ec02af3282652a18098f02a7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 2456, "upload_time": "2018-09-20T13:35:31", "url": "https://files.pythonhosted.org/packages/35/b2/73fa402f14dc041a20346fc55bb22a9d6cdc4ba9e775c0d7f9679f3111b0/pytest-atomic-1.1.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "6050419e98e6ff55a7f1ac0218f0657d", "sha256": "02b990b3132e540cc14b59ae66b0c9319cb33d03082b56d59d2fe3075d47c214" }, "downloads": -1, "filename": "pytest-atomic-2.0.0.tar.gz", "has_sig": false, "md5_digest": "6050419e98e6ff55a7f1ac0218f0657d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.5", "size": 3761, "upload_time": "2018-11-24T07:28:23", "url": "https://files.pythonhosted.org/packages/72/36/a4c277cf2f81decd7ce391bee6449c7bede1874265bc649b85335f0930f0/pytest-atomic-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6050419e98e6ff55a7f1ac0218f0657d", "sha256": "02b990b3132e540cc14b59ae66b0c9319cb33d03082b56d59d2fe3075d47c214" }, "downloads": -1, "filename": "pytest-atomic-2.0.0.tar.gz", "has_sig": false, "md5_digest": "6050419e98e6ff55a7f1ac0218f0657d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.5", "size": 3761, "upload_time": "2018-11-24T07:28:23", "url": "https://files.pythonhosted.org/packages/72/36/a4c277cf2f81decd7ce391bee6449c7bede1874265bc649b85335f0930f0/pytest-atomic-2.0.0.tar.gz" } ] }