{ "info": { "author": "Trent Mick", "author_email": "trentm@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.4", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.1", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Testing" ], "description": "This is my own hacky micro test harness for Python unittests. It is currently\nin use in a number of projects with large test cases. You might want to checkout\n\"nose\" or \"unittest2\" first. :) Some features include:\n\n- small, you can just put this one file in your \"test\" dir\n- no external dependencies other than the stdlib\n- tagging of individual and groups of tests to allow easily running test\n subsets (can be very helpful in huge doc sets)\n- support for \"TestSkipped\" as a return from a test (TODO: has modern\n unittest.py added this now?). This is helpful for tests of platform-dependent\n or optional features.\n\n# Usage\n\nA typical Python project setup (at least for me) is:\n\n foo/ # project foo\n README.md\n setup.py\n lib/\n foo.py # the main code of the project\n test/\n testlib.py # the testlib.py from *this project*\n test.py # a small stub driver\n test_foo.py # an actual test file with TestCase's\n test_bar.py # another test file\n\nMinimally the \"test.py\" driver is:\n\n import sys, os\n import testlib\n # Put the 'lib' dir on sys.path.\n sys.path.insert(0, join(dirname(dirname(abspath(__file__))), \"lib\"))\n sys.exit(testlib.harness())\n\nThen you run:\n\n cd test \n python test.py\n\nThe test harness will find all TestCase classes in all \"test_*.py\" files and\nrun them. Tagging support allows you to run subsets of the full test suite:\n\n python test.py foo # Just run tests in \"test_foo.py\"\n python test.py bar # ... just in \"test_bar.py\"\n\nIf \"test_bar.py\" looked something like this:\n\n import unittest\n from testlib import tag\n class BlahTestCase(unittest.TestCase):\n @tag(\"question\")\n def test_whozit(self):\n ...\n @tag(\"question\")\n def test_whatzit(self):\n ...\n def test_thatzit(self):\n ...\n\nThe then following would be possible:\n\n python test.py blah # run all tests in `BlahTestCase`\n python test.py question # run all tests tagged \"question\"\n python test.py -- -question # run all test *except* those tagged \"question\"\n python test.py whozit # run just `BlahTestCase.test_whozit`\n\nSee \"Naming and Tagging\" below for more details.\n\n\n# Example Output\n\nTODO\n\n# Naming and Tagging\n\nTODO\n\n# Gathering from Multiple Test Directories\n\nTODO\n\n# Real-world examples\n\n- [openkomodo](http://svn.openkomodo.com/openkomodo/view/openkomodo/trunk/test/test.py): the code for Komodo IDE and Edit\n- [python-markdown2](http://code.google.com/p/python-markdown2/source/browse/#svn/trunk/test)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/trentm/testlib", "keywords": "test unittest harness driver", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "testlib", "package_url": "https://pypi.org/project/testlib/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/testlib/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/trentm/testlib" }, "release_url": "https://pypi.org/project/testlib/0.6.5/", "requires_dist": null, "requires_python": null, "summary": "a micro test suite harness", "version": "0.6.5" }, "last_serial": 800490, "releases": { "0.6.4": [ { "comment_text": "", "digests": { "md5": "81729400d595ec2d47861a8c5973f3d6", "sha256": "dce818879f43c76d172ae5e21838c9d6b71e78f732fb01acf9b31dc6cb42dc62" }, "downloads": -1, "filename": "testlib-0.6.4.zip", "has_sig": false, "md5_digest": "81729400d595ec2d47861a8c5973f3d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15208, "upload_time": "2010-07-10T09:07:12", "url": "https://files.pythonhosted.org/packages/81/7d/27bf7119a1233c5ec00793fe6bca789695cd088e6b1009604ae9bb9cf7a7/testlib-0.6.4.zip" } ], "0.6.5": [ { "comment_text": "", "digests": { "md5": "1c40a2f147e595b128733462f10ee53d", "sha256": "7ec84a56a98a8e45dbb60900c4660ec317f085dc15d80cf65b0b75623b33e2d7" }, "downloads": -1, "filename": "testlib-0.6.5.zip", "has_sig": false, "md5_digest": "1c40a2f147e595b128733462f10ee53d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16330, "upload_time": "2010-07-12T18:46:56", "url": "https://files.pythonhosted.org/packages/17/94/0688329215ba098e55913d861507abed2b2a586a6376d9216d93042cce13/testlib-0.6.5.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1c40a2f147e595b128733462f10ee53d", "sha256": "7ec84a56a98a8e45dbb60900c4660ec317f085dc15d80cf65b0b75623b33e2d7" }, "downloads": -1, "filename": "testlib-0.6.5.zip", "has_sig": false, "md5_digest": "1c40a2f147e595b128733462f10ee53d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16330, "upload_time": "2010-07-12T18:46:56", "url": "https://files.pythonhosted.org/packages/17/94/0688329215ba098e55913d861507abed2b2a586a6376d9216d93042cce13/testlib-0.6.5.zip" } ] }