{ "info": { "author": "Mathieu Bridon", "author_email": "bochecha@daitauha.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Plugins", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Testing" ], "description": "Sandboxed Tests\n===============\n\nThis `pytest`_ plugin allows running each test in its own `bubblewrap`_\nsandbox.\n\nThis means each test runs in its own isolated environment, no test has any\nside-effects on any other.\n\nBasic Usage\n-----------\n\nJust install the plugin::\n\n $ pip install pytest-bwrap\n\nThen run your tests as usual, with a single added option::\n\n $ py.test --bwrap\n\nEach test will be run in its own sandbox.\n\nSandbox details\n---------------\n\nThe sandbox will have its own filesystem, layed out as follows:\n\n* network access is blocked by default; (see \"Options\")\n\n* the following are mounted read-only from the host system:\n\n * ``/etc/hosts`` and ``/etc/resolv.conf``\n * ``/usr`` (and the accompanying ``/bin``, ``/lib``, ``/sbin``, with proper\n handling of ``/usr``-merge)\n\n* the following are mounted from the host system:\n\n * ``/dev``\n * ``/proc``\n * the current directory (that is, the root of the project you are testing)\n * the active virtualenv, if running in one\n\n* ``/tmp`` is a new ``tmpfs``;\n\nOptions\n-------\n\nNetwork Access\n~~~~~~~~~~~~~~\n\nTests can optionally be granted network access, by decorating them with\n``pytest_bwrap.decorators.network_enabled()``.\n\nAdditional Read-only Directories\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIt is sometimes useful to have read-only directories, for example when\nverifying error handling in the tested functions.\n\nThis can be achieved in one of two ways:\n\n* decorating the test function with\n ``pytest_bwrap.decorators.read_only('/path/to/ro-dir')``;\n* setting the ``extra-ro-dirs`` option in the `pytest configuration`_;\n\nExample\n-------\n\nA full example of how to use this plugin for testing is included.\n\nIn particular, it shows how to use the decorators as well as the pytest\nconfiguration.\n\nYou should be able to switch to that directory, then run the tests::\n\n $ pip install -r requirements.txt\n $ py.test --bwrap\n\nAll the tests should pass.\n\nLicense\n-------\n\nThis project is offered under the terms of the\n`GNU Lesser General Public License, either version 3 or any later version`_,\nsee the `COPYING`_ file for details.\n\n\n.. _bubblewrap: https://github.com/projectatomic/bubblewrap\n.. _COPYING: COPYING\n.. _GNU Lesser General Public License, either version 3 or any later version: http://www.gnu.org/licenses/lgpl.html\n.. _pytest: https://docs.pytest.org\n.. _pytest configuration: https://docs.pytest.org/en/latest/customize.html\n\n\n0.1\n---\n\nInitial release, with a basic feature-set to run each test in its own sandbox:\n\n* host file system is mounted read-only, CWD is mounted read-write;\n* network access is disabled by default but can be enabled for selected tests;\n* additional directories can be made read-only;", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://framagit.org/bochecha/pytest-bwrap/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pytest-bwrap", "package_url": "https://pypi.org/project/pytest-bwrap/", "platform": "", "project_url": "https://pypi.org/project/pytest-bwrap/", "project_urls": { "Homepage": "https://framagit.org/bochecha/pytest-bwrap/" }, "release_url": "https://pypi.org/project/pytest-bwrap/0.1/", "requires_dist": null, "requires_python": "", "summary": "Run your tests in Bubblewrap sandboxes", "version": "0.1" }, "last_serial": 4419722, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ba4763f85b415a710e12e9cfe310c5c1", "sha256": "63726473f0619ebb8d4fd331f14dde6f559be3002b912d78f5ae2d7b4d60f78d" }, "downloads": -1, "filename": "pytest-bwrap-0.1.tar.gz", "has_sig": false, "md5_digest": "ba4763f85b415a710e12e9cfe310c5c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5644, "upload_time": "2018-10-26T15:13:17", "url": "https://files.pythonhosted.org/packages/8b/6a/db145307bb4cb453e8c6deb1d007419552d210137d2a94b9dd3eeb9066e4/pytest-bwrap-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ba4763f85b415a710e12e9cfe310c5c1", "sha256": "63726473f0619ebb8d4fd331f14dde6f559be3002b912d78f5ae2d7b4d60f78d" }, "downloads": -1, "filename": "pytest-bwrap-0.1.tar.gz", "has_sig": false, "md5_digest": "ba4763f85b415a710e12e9cfe310c5c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5644, "upload_time": "2018-10-26T15:13:17", "url": "https://files.pythonhosted.org/packages/8b/6a/db145307bb4cb453e8c6deb1d007419552d210137d2a94b9dd3eeb9066e4/pytest-bwrap-0.1.tar.gz" } ] }