{ "info": { "author": "Steinwurf ApS", "author_email": "contact@steinwurf.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Plugins", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development", "Topic :: Software Development :: Testing" ], "description": "============\nIntroduction\n============\n\n.. image:: https://badge.fury.io/py/pytest-testdirectory.svg\n :target: https://badge.fury.io/py/pytest-testdirectory\n\nTesting code by invoking executable which potentially creates and deletes\nfiles and directories can be hard and error prone.\n\nThe purpose of this module is to simplify this task.\n\npytest-testdirectory provides a py.test fixture for working with temporary\ndirectories.\n\n.. contents:: Table of Contents:\n :local:\n\nInstallation\n===========\n\nTo install pytest-testdirectory::\n\n pip install pytest-testdirectory\n\nUsage\n=====\n\nTo make it easy to use in with py.test the TestDirectory object can be\ninjected into a test function by using the testdirectory fixture.\n\nExample::\n\n def test_this_function(testdirectory):\n images = testdirectory.mkdir('images')\n images.copy_files('test/images/*')\n\n r = testdirectory.run('imagecompress --path=images')\n\n # r is an RunResult object containing information about the command\n # we just executed\n assert r.stdout.match('*finished successfully*')\n\nThe testdirectory is an instance of TestDirectory and represents an actual\ntemporary directory somewhere on the machine running the test code. Using\nthe API we can create additional temporary directories, populate them with\nan initial set of files and finally run some executable and observe its\nbehavior.\n\nRelase new version\n==================\n\n1. Edit NEWS.rst and wscript (set correct VERSION)\n2. Run ::\n\n ./waf upload\n\nSource code\n===========\n\nThe main functionality is found in ``src/testdirectory.py`` and the\ncorresponding unit test is in ``test/test_testdirectory.py`` if you\nwant to play/modify/fix the code this would, in most cases, be the place\nto start.\n\nDeveloper Notes\n===============\n\nWe try to make our projects as independent as possible of a local system setup.\nFor example with our native code (C/C++) we compile as much as possible from\nsource, since this makes us independent of what is currently installed\n(libraries etc.) on a specific machine.\n\nTo \"fetch\" sources we use Waf (https://waf.io/) augmented with dependency\nresolution capabilities: https://github.com/steinwurf/waf\n\nThe goal is to enable a work-flow where running::\n\n ./waf configure\n ./waf build --run_tests\n\nConfigures, builds and runs any available tests for a given project, such that\nyou as a developer can start hacking at the code.\n\nFor Python project this is a bit unconventional, but we think it works well.\n\nTests\n=====\n\nThe tests will run automatically by passing ``--run_tests`` to waf::\n\n ./waf --run_tests\n\nThis follows what seems to be \"best practice\" advise, namely to install the\npackage in editable mode in a virtualenv.\n\nNotes\n=====\n\n* Why use an ``src`` folder (https://hynek.me/articles/testing-packaging/).\n tl;dr you should run your tests in the same environment as your users would\n run your code. So by placing the source files in a non-importable folder you\n avoid accidentally having access to resources not added to the Python\n package your users will install...\n* Python packaging guide: https://packaging.python.org/distributing/\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/steinwurf/pytest-testdirectory", "keywords": "pytest py.test testing unit tests plugin", "license": "BSD 3-clause \"New\" or \"Revised\" License", "maintainer": "", "maintainer_email": "", "name": "pytest-testdirectory", "package_url": "https://pypi.org/project/pytest-testdirectory/", "platform": "", "project_url": "https://pypi.org/project/pytest-testdirectory/", "project_urls": { "Homepage": "https://github.com/steinwurf/pytest-testdirectory" }, "release_url": "https://pypi.org/project/pytest-testdirectory/3.1.0/", "requires_dist": [ "pytest" ], "requires_python": "", "summary": "A py.test plugin providing temporary directories in unit tests.", "version": "3.1.0" }, "last_serial": 4457825, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "49da80781af91acd63b4f3cbdae3caa0", "sha256": "f2a51b267ef7a531c8c8052dcaddf09f0c198c1f586d3a4887e1c7df52ac53ed" }, "downloads": -1, "filename": "pytest_testdirectory-0.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "49da80781af91acd63b4f3cbdae3caa0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5419, "upload_time": "2017-05-08T14:30:15", "url": "https://files.pythonhosted.org/packages/fc/8d/5c652656c5f192a24291be08602a1e05aa5a697e483ec96ec52583297edb/pytest_testdirectory-0.0.0-py2.py3-none-any.whl" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "ce6f614625d0d70783b390e678fc8bf9", "sha256": "45b58b9567c2c351a69258eefc5798aceb7b6d333d67ce59b6608bbfe3661ff3" }, "downloads": -1, "filename": "pytest_testdirectory-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ce6f614625d0d70783b390e678fc8bf9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5630, "upload_time": "2017-05-09T09:05:05", "url": "https://files.pythonhosted.org/packages/bc/45/1f4d44edec5bfce3ea20dab4b3103331241761bd7130b50f528570f65e3a/pytest_testdirectory-1.0.2-py2.py3-none-any.whl" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "11057368c0771425a7c0b8aab33f65ff", "sha256": "a089be82affdc1498d50eb4a9b48b766384ba5a0af2781136340f478c97de419" }, "downloads": -1, "filename": "pytest_testdirectory-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "11057368c0771425a7c0b8aab33f65ff", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10329, "upload_time": "2017-05-24T12:49:20", "url": "https://files.pythonhosted.org/packages/4a/f7/92089f21e5dad6081ddfb7c075664579ea09f4250e80914e9288698aec8f/pytest_testdirectory-2.0.0-py2.py3-none-any.whl" } ], "2.1.0": [ { "comment_text": "", "digests": { "md5": "d5babf810fef7f64a2c797f53cfe5a77", "sha256": "3d1de5a14724a23e99b2716e87573693cdd36510aa771f86fc4056227a578f39" }, "downloads": -1, "filename": "pytest_testdirectory-2.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d5babf810fef7f64a2c797f53cfe5a77", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10414, "upload_time": "2017-06-12T11:26:52", "url": "https://files.pythonhosted.org/packages/02/92/1d906bf7aa94ef4e2386652633b9337232a3febd53471f2660437e175ea0/pytest_testdirectory-2.1.0-py2.py3-none-any.whl" } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "11db1df5fe89c81bc58d92c403215ef8", "sha256": "14937d2c87b87de97633e9fa91347536a5f2597b856199c71cb35bf5d0aea472" }, "downloads": -1, "filename": "pytest_testdirectory-3.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "11db1df5fe89c81bc58d92c403215ef8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10872, "upload_time": "2017-08-11T13:02:10", "url": "https://files.pythonhosted.org/packages/26/c2/56ad0f7874f5c36795251ab5d9917252c94323b2873294169e376f8e8141/pytest_testdirectory-3.0.0-py2.py3-none-any.whl" } ], "3.1.0": [ { "comment_text": "", "digests": { "md5": "d7687fb556ef32d051a75b072a6dcf15", "sha256": "e045d44ac7e6736ddd7c712db4498b820819f24136ac0bebfda8554c59aa1c46" }, "downloads": -1, "filename": "pytest_testdirectory-3.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d7687fb556ef32d051a75b072a6dcf15", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11161, "upload_time": "2017-08-15T10:12:32", "url": "https://files.pythonhosted.org/packages/cd/b5/6a51c41d8679b685da1637b3e62e3126695efdf477cbe2a5c23fc4fd6503/pytest_testdirectory-3.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b1a7f858563e74da07ee2e2539632702", "sha256": "cd8372b805a17a41439ad254460885aaa7d114d73bbc9d8efa676142650b07cc" }, "downloads": -1, "filename": "pytest-testdirectory-3.1.0.tar.gz", "has_sig": false, "md5_digest": "b1a7f858563e74da07ee2e2539632702", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 126065, "upload_time": "2018-11-06T15:23:23", "url": "https://files.pythonhosted.org/packages/77/b1/f07a0c0256083747f4aad079d8ebb38f37c86ec595b8b88d03747cca43eb/pytest-testdirectory-3.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d7687fb556ef32d051a75b072a6dcf15", "sha256": "e045d44ac7e6736ddd7c712db4498b820819f24136ac0bebfda8554c59aa1c46" }, "downloads": -1, "filename": "pytest_testdirectory-3.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d7687fb556ef32d051a75b072a6dcf15", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11161, "upload_time": "2017-08-15T10:12:32", "url": "https://files.pythonhosted.org/packages/cd/b5/6a51c41d8679b685da1637b3e62e3126695efdf477cbe2a5c23fc4fd6503/pytest_testdirectory-3.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b1a7f858563e74da07ee2e2539632702", "sha256": "cd8372b805a17a41439ad254460885aaa7d114d73bbc9d8efa676142650b07cc" }, "downloads": -1, "filename": "pytest-testdirectory-3.1.0.tar.gz", "has_sig": false, "md5_digest": "b1a7f858563e74da07ee2e2539632702", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 126065, "upload_time": "2018-11-06T15:23:23", "url": "https://files.pythonhosted.org/packages/77/b1/f07a0c0256083747f4aad079d8ebb38f37c86ec595b8b88d03747cca43eb/pytest-testdirectory-3.1.0.tar.gz" } ] }