{ "info": { "author": "mapix", "author_email": "mapix.me@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License" ], "description": "=======\r\nutknows\r\n=======\r\n\r\n**utknows** is a unittest patch that can automaticly ``skip`` test case\r\nbased on dependence info calculated by ``trace``.\r\n\r\nInstalling\r\n==========\r\n\r\nYou can install **utknows** through ``pip`` or ``easy-install``::\r\n\r\n pip install utknows\r\n\r\nOr you can download the `latest development version`_, which may\r\ncontain new features.\r\n\r\nUsing utknows\r\n================\r\n\r\n**utknows** should be used before ``unittest.main`` is invoked like this::\r\n\r\n from utknows import setup_utknows\r\n setup_utknows(db, db_prefix=\"utknows\", root_dir=os.path.abspath(os.curdir))\r\n unittest.main(******, exit=False)\r\n # some resource release, etc db.close()\r\n\r\nThe ``db`` is a persistence database instance, and implementate ``__getitem__`` and ``__setitem__`` method.\r\n\r\nThe ``root_dir`` is the tracing base of dependence used by trace.\r\n\r\nThe ``db_prefix`` is the key prefix in ``db``.\r\n\r\nWhen the first time tests runs, it calculate all the dependence info of every testcase::\r\n\r\n utknows/examples$ python alltests.py\r\n ......\r\n ----------------------------------------------------------------------\r\n Ran 6 tests in 0.031s\r\n OK\r\n\r\nAfter that, the case will be skipped when the dependence info is satisfacted::\r\n\r\n utknows/examples$ python alltests.py\r\n ssssss\r\n ----------------------------------------------------------------------\r\n Ran 0 tests in 0.003s\r\n\r\n OK (skipped=6)\r\n\r\nCase will be rerun after you modify any file it depends::\r\n\r\n utknows/examples$ touch test_hello.py\r\n utknows/examples$ python alltests.py \r\n ...sss\r\n ----------------------------------------------------------------------\r\n Ran 3 tests in 0.003s\r\n\r\n OK (skipped=3)\r\n\r\nThe ``s`` output here stand for ``skip``.\r\n\r\nExamples\r\n========\r\n\r\nUsing ``redis`` as backend::\r\n\r\n import redis\r\n\r\n def open_db():\r\n return redis.Redis(host='localhost', port=6379, db=0)\r\n\r\n def close_db(db):\r\n db.client_kill('localhost:6379')\r\n\r\n from utknows import setup_utknows\r\n db = open_db()\r\n setup_utknows(db, root_dir=os.path.abspath(os.curdir))\r\n unittest.main(defaultTest=\"suite\", buffer=True, exit=False)\r\n close_db(db)\r\n\r\n\r\nUsing ``dbm`` as backend::\r\n\r\n import os\r\n import shelve\r\n\r\n def open_db():\r\n return shelve.open(os.path.join(os.curdir, '.utknows'), writeback=True)\r\n\r\n def close_db(db):\r\n db.sync()\r\n db.close()\r\n\r\n from utknows import setup_utknows\r\n db = open_db()\r\n setup_utknows(db, root_dir=os.path.abspath(os.curdir))\r\n unittest.main(defaultTest=\"suite\", buffer=True, exit=False)\r\n close_db(db)\r\n\r\n\r\nLicense\r\n========\r\n\r\n**utknows** is copyright 2013 mapix and Contributors, and is made\r\navailable under BSD-style license; see LICENSE for details.\r\n\r\n.. _`latest development version`: https://github.com/mapix/utknows/tarball/master#egg=utknows", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/mapix/utknows", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://mapix.me/utknows/", "keywords": "utknows, unittest", "license": "BSD", "maintainer": "mapix", "maintainer_email": "mapix.me@gmail.com", "name": "utknows", "package_url": "https://pypi.org/project/utknows/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/utknows/", "project_urls": { "Download": "https://github.com/mapix/utknows", "Homepage": "http://mapix.me/utknows/" }, "release_url": "https://pypi.org/project/utknows/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "A unittest patch that can automaticly ``skip`` test case based on dependence info calculated by ``trace``.", "version": "0.1.1" }, "last_serial": 1103819, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "9c9aedf9e61f3079cb7e3985ce1744db", "sha256": "bc47d1cf8384393813cea495537c8753e984f6386f075d3ac3127ddb9d6f7ccc" }, "downloads": -1, "filename": "utknows-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9c9aedf9e61f3079cb7e3985ce1744db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2918, "upload_time": "2013-11-22T04:13:00", "url": "https://files.pythonhosted.org/packages/9d/52/3a9ab3d4b865dad275e750d084ab2f9d5a2fa2d3225757eda45f7743c96f/utknows-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9c9aedf9e61f3079cb7e3985ce1744db", "sha256": "bc47d1cf8384393813cea495537c8753e984f6386f075d3ac3127ddb9d6f7ccc" }, "downloads": -1, "filename": "utknows-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9c9aedf9e61f3079cb7e3985ce1744db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2918, "upload_time": "2013-11-22T04:13:00", "url": "https://files.pythonhosted.org/packages/9d/52/3a9ab3d4b865dad275e750d084ab2f9d5a2fa2d3225757eda45f7743c96f/utknows-0.1.1.tar.gz" } ] }