{ "info": { "author": "The Astropy Developers", "author_email": "astropy.team@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Testing", "Topic :: Utilities" ], "description": "================\npytest-openfiles\n================\n\nThis package provides a plugin for the `pytest`_ framework that allows\ndevelopers to detect whether any file handles or other file-like objects were\ninadvertently left open at the end of a unit test. It has been moved from the\ncore `astropy`_ project since it is of use more generally.\n\n.. _pytest: https://pytest.org/en/latest/\n.. _astropy: https://astropy.org/en/latest/\n\n**NOTE**: This plugin is not supported with Py2.7 on Win32 platforms.\n\nMotivation\n----------\n\nThe `pytest-openfiles`_ plugin allows for the detection of open I/O resources\nat the end of unit tests. This is particularly useful for testing code that\nmanipulates file handles or other I/O resources. It allows developers to ensure\nthat this kind of code properly cleans up I/O resources when they are no longer\nneeded.\n\nInstallation\n------------\n\nThe ``pytest-openfiles`` plugin can be installed using ``pip``::\n\n $ pip install pytest-openfiles\n\nIt is also possible to install the latest development version from the source\nrepository::\n\n $ git clone https://github.com/astropy/pytest-openfiles\n $ cd pytest-openfiles\n $ python ./setup.py install\n\nIn either case, the plugin will automatically be registered for use with\n``pytest``.\n\nUsage\n-----\n\nThis plugin adds the ``--open-files`` option to the ``pytest`` command. When\nrunning tests with ``--open-files``, if a file is opened during the course of a\nunit test but that file is not closed before the test finishes, the test will\nfail.\n\nIn some cases certain files are expected to remain open between tests. In order\nto prevent these files from causing tests to fail, they can be ignored using\nthe configuration file variable ``open_files_ignore``. This variable is added\nto the ``[tool:pytest]`` section of a package's top-level ``setup.cfg`` file.\n\nFiles can be ignored using a fully specified filename::\n\n [tool:pytest]\n open_files_ignore = \"/home/user/monty/output.log\"\n\nIt is also possible to ignore files with a particular name regardless of where\nthey reside in the file system::\n\n [tool:pytest]\n open_files_ignore = \"output.log\"\n\nIn this example, all files named ``output.log`` will be ignored if they are\nfound to remain open after a test completes. Paths and filenames can include\n``*`` and ``?`` as wildcards::\n\n [tool:pytest]\n open_files_ignore = \"*.ttf\"\n\nIt is also possible to ignore open files for particular test cases by\ndecorating them with the ``openfiles_ignore`` decorator:\n\n.. code::\n\n import pytest\n\n @pytest.mark.openfiles_ignore\n def test_open_file_and_ignore():\n \"\"\"We want to ignore this test when checking for open file handles.\"\"\"\n\n\nThe test function will not be skipped, but any files that are left open by the\ntest will be ignored by this plugin.\n\n\nDevelopment Status\n------------------\n\n.. image:: https://travis-ci.org/astropy/pytest-openfile.svg\n :target: https://travis-ci.org/astropy/pytest-openfiles\n :alt: Travis CI Status\n\n.. image:: https://ci.appveyor.com/api/projects/status/944gtt7n0o1d6826/branch/master?svg=true\n :target: https://ci.appveyor.com/project/Astropy/pytest-openfiles/branch/master\n :alt: Appveyor Status\n\nQuestions, bug reports, and feature requests can be submitted on `github`_.\n\n.. _github: https://github.com/astropy/pytest-openfiles\n\nLicense\n-------\nThis plugin is licensed under a 3-clause BSD style license - see the\n``LICENSE.rst`` file.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://astropy.org", "keywords": "detect,open,file,handle,psutil,pytest,py.test", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "pytest-openfiles", "package_url": "https://pypi.org/project/pytest-openfiles/", "platform": "", "project_url": "https://pypi.org/project/pytest-openfiles/", "project_urls": { "Homepage": "https://astropy.org" }, "release_url": "https://pypi.org/project/pytest-openfiles/0.4.0/", "requires_dist": [ "pytest (>=2.8.0)", "psutil" ], "requires_python": ">=2.7", "summary": "Pytest plugin for detecting inadvertent open file handles", "version": "0.4.0" }, "last_serial": 5848218, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "3e5019cc0359d3f250eff2fd60eedbd3", "sha256": "5b01028f5c0bcbfd47f3deb4abde3b0463bf25d37fd9e0f6efaa9d09e8099a9c" }, "downloads": -1, "filename": "pytest-openfiles-0.1.0.tar.gz", "has_sig": true, "md5_digest": "3e5019cc0359d3f250eff2fd60eedbd3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 4183, "upload_time": "2017-10-10T15:01:42", "url": "https://files.pythonhosted.org/packages/e0/f1/06b0ad8dc139e0ae1ce6157a387ef5b9d0bbf98b0f92f21cd8a5bd10943a/pytest-openfiles-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "67be17f8a5eec42a23ed2c0cb1cc3894", "sha256": "254d8a4326fa60c2532419c44932d529fb7172616ff126b154a09907d398d0b2" }, "downloads": -1, "filename": "pytest-openfiles-0.2.0.tar.gz", "has_sig": true, "md5_digest": "67be17f8a5eec42a23ed2c0cb1cc3894", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 5216, "upload_time": "2017-12-07T21:22:54", "url": "https://files.pythonhosted.org/packages/42/12/1db1aa4405083fd15b729e0e11c7b535100625f65eaf6ab07091c0910742/pytest-openfiles-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "ca2dd340e2b4df7de4bba9ed014d657d", "sha256": "be5e6a0e7c6a64e58a27bdcdd9ab2aa09a9a9c9a525499ee08d2e77e2c19f535" }, "downloads": -1, "filename": "pytest-openfiles-0.3.0.tar.gz", "has_sig": true, "md5_digest": "ca2dd340e2b4df7de4bba9ed014d657d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 5707, "upload_time": "2018-04-20T17:51:29", "url": "https://files.pythonhosted.org/packages/8d/28/8a3cb0c66e671a9dbaef49188d9e41edab440ecfad6d85b845b75bb5708f/pytest-openfiles-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "44cf5a6664388f69033f2ead77bb27ae", "sha256": "bf09cd83ca0554799292f536800f54e4892f8000283daaf9d9fc6b6eb2d8a9da" }, "downloads": -1, "filename": "pytest-openfiles-0.3.1.tar.gz", "has_sig": true, "md5_digest": "44cf5a6664388f69033f2ead77bb27ae", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 5937, "upload_time": "2018-11-26T14:40:06", "url": "https://files.pythonhosted.org/packages/7f/06/1101bcbae2cf41f345e1442ccd6a44b20c55e5f246a2aa828e386544a1f7/pytest-openfiles-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "b219c5487f7630c3944973cf24709340", "sha256": "e51c91889eb9e4c75f47735efc57a1435f3f1182463600ba7bce7f2556a46884" }, "downloads": -1, "filename": "pytest-openfiles-0.3.2.tar.gz", "has_sig": true, "md5_digest": "b219c5487f7630c3944973cf24709340", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 6132, "upload_time": "2019-01-07T15:19:11", "url": "https://files.pythonhosted.org/packages/6c/31/6804de3e63301e3d466bbb0a82d4dbc88db1da92ec1be770931a497af5b2/pytest-openfiles-0.3.2.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "ff6f9c0f538f250c8fd82bb9d7c162b8", "sha256": "10a30db607f6bd6f9d3a28908a7a4c3ba35cacea7b3e2876097cab5b6bd207e8" }, "downloads": -1, "filename": "pytest_openfiles-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ff6f9c0f538f250c8fd82bb9d7c162b8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7", "size": 6138, "upload_time": "2019-07-20T13:08:15", "url": "https://files.pythonhosted.org/packages/b0/68/7866e119e8fcaa3b95c81ae12334917d35ed9229d753aa6f1a926a647d3e/pytest_openfiles-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "23fcf695c3d0245cb3f9d69952f189e6", "sha256": "af591422f2bfa95f7690d83aeb8d76bd5421cb8b1dcaf085d58cd92e8d92058d" }, "downloads": -1, "filename": "pytest-openfiles-0.4.0.tar.gz", "has_sig": false, "md5_digest": "23fcf695c3d0245cb3f9d69952f189e6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 7558, "upload_time": "2019-07-20T13:08:17", "url": "https://files.pythonhosted.org/packages/e7/66/18742fccef47d9b0dab5a4b6583b5b69c4db70ffaf1764d9b376e9317b94/pytest-openfiles-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ff6f9c0f538f250c8fd82bb9d7c162b8", "sha256": "10a30db607f6bd6f9d3a28908a7a4c3ba35cacea7b3e2876097cab5b6bd207e8" }, "downloads": -1, "filename": "pytest_openfiles-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ff6f9c0f538f250c8fd82bb9d7c162b8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7", "size": 6138, "upload_time": "2019-07-20T13:08:15", "url": "https://files.pythonhosted.org/packages/b0/68/7866e119e8fcaa3b95c81ae12334917d35ed9229d753aa6f1a926a647d3e/pytest_openfiles-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "23fcf695c3d0245cb3f9d69952f189e6", "sha256": "af591422f2bfa95f7690d83aeb8d76bd5421cb8b1dcaf085d58cd92e8d92058d" }, "downloads": -1, "filename": "pytest-openfiles-0.4.0.tar.gz", "has_sig": false, "md5_digest": "23fcf695c3d0245cb3f9d69952f189e6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 7558, "upload_time": "2019-07-20T13:08:17", "url": "https://files.pythonhosted.org/packages/e7/66/18742fccef47d9b0dab5a4b6583b5b69c4db70ffaf1764d9b376e9317b94/pytest-openfiles-0.4.0.tar.gz" } ] }