{ "info": { "author": "Zero Piraeus", "author_email": "z@etiol.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Plugins", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Natural Language :: English", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "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", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "\n==========================\nfix - Simple test fixtures\n==========================\n\n:Author: Zero Piraeus\n:Contact: z@etiol.net\n\n**fix** is a simple library to assist with the creation of fixtures for test\nfunctions, methods etc. It provides one decorator, ``with_fixture``, which\nallows you to attach ``setup()`` and ``teardown()`` functions to the decorated\ncallable, and access information defined in the fixture from within the test\nfunction.\n\n**fix** was written for use with nose_, but doesn't depend on it, and may also\nprove useful with other test frameworks.\n\n.. _nose: http://nose.readthedocs.org/en/latest/index.html\n\n\nExamples\n--------\n\nHere's a basic example with setup but no teardown::\n\n from fix import with_fixture\n\n def setup_only(context):\n\n def setup():\n \"\"\"Add something to the context.\"\"\"\n assert context == {}\n context.squee = \"kapow\"\n\n return setup\n\n @with_fixture(setup_only)\n def case(context):\n assert context == {\"squee\": \"kapow\"}\n\n... and here's a rather more involved one that creates some temporary files to\nwork with, then deletes them during teardown::\n\n import os\n import shutil\n import tempfile\n\n from fix import with_fixture\n\n def external(context, files=3):\n\n def setup():\n context.temp_dir = tempfile.mkdtemp()\n context.filenames = [\"file_%03d\" % i for i in range(files)]\n for filename in context.filenames:\n with open(os.path.join(context.temp_dir, filename), \"w\") as f:\n f.write(\"This is the file %r.\\n\" % filename)\n\n def teardown():\n shutil.rmtree(context.temp_dir)\n\n return setup, teardown\n\n @with_fixture(external, files=5)\n def check_files(context):\n present = 0\n absent = 0\n for filename in context.filenames:\n if os.path.exists(os.path.join(context.temp_dir, filename)):\n present += 1\n else:\n absent += 1\n return context.temp_dir, present, absent\n\n temp_dir, present, absent = check_files()\n assert not os.path.exists(temp_dir)\n assert present == 5\n assert absent == 0\n\n\nInstallation\n------------\n\nThis should do the trick::\n\n pip install fix\n\n\nLicence\n---------\n\n**fix** is released under the GNU General Public License (version 3 or later),\na copy of which is included with this distribution in the file **COPYING**.\n\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://bitbucket.org/schesis/fix", "keywords": "simple test fixture", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "fix", "package_url": "https://pypi.org/project/fix/", "platform": "", "project_url": "https://pypi.org/project/fix/", "project_urls": { "Homepage": "https://bitbucket.org/schesis/fix" }, "release_url": "https://pypi.org/project/fix/1.0.3/", "requires_dist": null, "requires_python": "", "summary": "Simple test fixtures.", "version": "1.0.3" }, "last_serial": 2770423, "releases": { "0.12.08a1": [ { "comment_text": "", "digests": { "md5": "93e80ee3566720b31578ae6b5267ac49", "sha256": "67ca37c378cfbbb4a98801f8e454e4470db28167342a963e2a2b108f2f437747" }, "downloads": -1, "filename": "fix-0.12.08a1.tar.gz", "has_sig": false, "md5_digest": "93e80ee3566720b31578ae6b5267ac49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17017, "upload_time": "2012-08-19T04:10:48", "url": "https://files.pythonhosted.org/packages/98/0f/9b24eaa5eb70e98ca0ae8843e4498c6508dac1676396df57a654947958f4/fix-0.12.08a1.tar.gz" } ], "0.12.08a2": [ { "comment_text": "", "digests": { "md5": "4a0e8a1c12f6a8862a2f02adc4d95068", "sha256": "3716454882af4bd2c1313265141960fb8313193da243e51fbd00cfbd57c85880" }, "downloads": -1, "filename": "fix-0.12.08a2.tar.gz", "has_sig": false, "md5_digest": "4a0e8a1c12f6a8862a2f02adc4d95068", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17034, "upload_time": "2012-08-19T04:26:35", "url": "https://files.pythonhosted.org/packages/86/82/6deb37f98ed3652942a96eaa868cf641bcda2f592d0f81cc2d751b32aad1/fix-0.12.08a2.tar.gz" } ], "0.12.08a3": [ { "comment_text": "", "digests": { "md5": "4d6a0011209022b50a0aeb78a1268243", "sha256": "6dad8af6bc3061c0eb3e594f3f76342207d522cf67ca4a8610893d2031338423" }, "downloads": -1, "filename": "fix-0.12.08a3.tar.gz", "has_sig": false, "md5_digest": "4d6a0011209022b50a0aeb78a1268243", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17131, "upload_time": "2012-08-19T14:02:34", "url": "https://files.pythonhosted.org/packages/62/0b/dc8015c93c252bc3cafb34591748f4e8ea2e65544b52ce3da0a022cf191d/fix-0.12.08a3.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "5f91028d2c8597ee9f2da152938a066d", "sha256": "dc74622999829c2d811baff47b97c227141e8c9fe8d2d9de90e5e350100b550f" }, "downloads": -1, "filename": "fix-1.0.0.tar.gz", "has_sig": false, "md5_digest": "5f91028d2c8597ee9f2da152938a066d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18158, "upload_time": "2015-02-25T15:35:10", "url": "https://files.pythonhosted.org/packages/a9/6d/984f2acfe2391f85cecd843196e2acf0770b6ae4cf456ea3c7590986a4af/fix-1.0.0.tar.gz" } ], "1.0.0a1": [ { "comment_text": "", "digests": { "md5": "66567e4d2c238ae1bfa5bfc5eed857a3", "sha256": "108f2526dd399cb9548259070eade259687ffa727af08fbb2d5dc48d83f3c6fa" }, "downloads": -1, "filename": "fix-1.0.0a1.tar.gz", "has_sig": false, "md5_digest": "66567e4d2c238ae1bfa5bfc5eed857a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18593, "upload_time": "2013-09-01T03:59:19", "url": "https://files.pythonhosted.org/packages/a9/20/5401356c41d04d4598018cd56819ad3456c1a971af98fa6291bf0f187b85/fix-1.0.0a1.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "a2955bf14c9f5ce36e9ad4570e7f6045", "sha256": "54d734c6bca96ad72ec4c6f434673a4637af6e876cf6d9c107f320a27c151d68" }, "downloads": -1, "filename": "fix-1.0.1.tar.gz", "has_sig": false, "md5_digest": "a2955bf14c9f5ce36e9ad4570e7f6045", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18246, "upload_time": "2015-02-25T15:50:55", "url": "https://files.pythonhosted.org/packages/db/a5/0388a604699e5f9b758bfb640d727b45e5b14a23f4f61e69c07fd5bb22f0/fix-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "803cbaa445885aec74c15b67f8e48b5c", "sha256": "a7132ab6d905554c8a66c8fff7517d4d12b76c818f077a80580fe83415d4b241" }, "downloads": -1, "filename": "fix-1.0.2.tar.gz", "has_sig": false, "md5_digest": "803cbaa445885aec74c15b67f8e48b5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17992, "upload_time": "2015-03-11T20:13:50", "url": "https://files.pythonhosted.org/packages/11/ab/eed1e9ba36fbf6bd46912c8eeb29f0af1d139126e89b9f2e036ea95a4836/fix-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "08f7b7f543f6bdd02df768c36280f6e9", "sha256": "3ae4cde8797c7444a7385f69599849ca7b3dd3663fb35503281341cb22e82c7b" }, "downloads": -1, "filename": "fix-1.0.3-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "08f7b7f543f6bdd02df768c36280f6e9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5551, "upload_time": "2017-04-11T00:37:41", "url": "https://files.pythonhosted.org/packages/90/9b/627043aa0968044debaaab41e529996bf4274da1086337d6fc4dd21f2abf/fix-1.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "07fd85c1c2f5b8164c530556e905e777", "sha256": "b378107a8975238fd27d1018bb4a78d86836f4f57769df86dadc127bc431001b" }, "downloads": -1, "filename": "fix-1.0.3.tar.gz", "has_sig": true, "md5_digest": "07fd85c1c2f5b8164c530556e905e777", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18722, "upload_time": "2017-04-11T00:37:56", "url": "https://files.pythonhosted.org/packages/1a/e4/c9571c4c18d2db8557602e470e607bba0132570eeb6ae77f0d7965564ffb/fix-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "08f7b7f543f6bdd02df768c36280f6e9", "sha256": "3ae4cde8797c7444a7385f69599849ca7b3dd3663fb35503281341cb22e82c7b" }, "downloads": -1, "filename": "fix-1.0.3-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "08f7b7f543f6bdd02df768c36280f6e9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5551, "upload_time": "2017-04-11T00:37:41", "url": "https://files.pythonhosted.org/packages/90/9b/627043aa0968044debaaab41e529996bf4274da1086337d6fc4dd21f2abf/fix-1.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "07fd85c1c2f5b8164c530556e905e777", "sha256": "b378107a8975238fd27d1018bb4a78d86836f4f57769df86dadc127bc431001b" }, "downloads": -1, "filename": "fix-1.0.3.tar.gz", "has_sig": true, "md5_digest": "07fd85c1c2f5b8164c530556e905e777", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18722, "upload_time": "2017-04-11T00:37:56", "url": "https://files.pythonhosted.org/packages/1a/e4/c9571c4c18d2db8557602e470e607bba0132570eeb6ae77f0d7965564ffb/fix-1.0.3.tar.gz" } ] }