{ "info": { "author": "Steven LI", "author_email": "steven004@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Testing", "Topic :: System :: Logging" ], "description": "nose plugin for test_steps auto check and log functions\n===============================================================\n\n.. image:: https://pypip.in/v/nose_autochecklog/badge.png\n :target: https://crate.io/packages/nose_autochecklog/\n\n.. image:: https://pypip.in/d/nose_autochecklog/badge.png\n :target: https://crate.io/packages/nose_autochecklog/\n\nThis nose plugin is very simple, which is for users who use test_steps in nose framework.\nUse this plugin, the function detection mechanism is using nose prepareTestCase to do it, instead of\nusing the original mechanism, which requires users know more about the auto-function-detection while\nwriting scripts originally.\n\n\nInstall nose-autochecklog\n---------------------------\n\n::\n\n pip install nose-autochecklog\n\n\n\nUsing\n------\nGiven the following tests (suppose it is in file /test_steps_example/test1.py)\n\n.. code-block:: python\n\n from test_steps import *\n import random\n def test_example():\n ok(\"just pass the check and log it\")\n #fail(\"Just fail the check and log it\")\n ok(3+2 == 5, \"pass if expr else fail\")\n #eq(\"Shanghai\", \"Beijing\", \"Shanghai not equal to Beijing\")\n eq(4+5, 9)\n ne(\"Shanghai\", \"Beijing\", \"Pass, Shanghai not equal to Beijing\")\n #'Shanghai City' contains 'Country', the second parameter could be regex\n check(\" 'Shanghai City' =~ 'Country' \", warning=True)\n unmatch(\"Shanghai City\", \"Country\", \"Pass, not contains, regex can be used too\")\n check('random.uniform(1,20) > 15', repeat=5)\n\n\nrunning it with nosetest using nose-autochecklog plugin::\n\n nosetests --with-autochecklog\n\nThen, you will get the following log in logfile /tmp/test_yyyymmdd_hhmm.log by default like::\n\n Steven-Mac:tmp Steven$ cat test_20150124_1545.log \n 2015-01-24 15:45:11,184 - INFO - ------------------------------------------------------\n 2015-01-24 15:45:11,197 - INFO - Func test_example in file: /test_steps_example/test1.py\n 2015-01-24 15:45:11,198 - INFO - Check-1: just pass the check and log it -PASS- \n 2015-01-24 15:45:11,198 - INFO - Check-2: pass if expr else fail -PASS- \n 2015-01-24 15:45:11,198 - INFO - Check-3: 9 == 9 -PASS- 9 == 9?\n 2015-01-24 15:45:11,199 - INFO - Check-4: Pass, Shanghai not equal to Beijing -PASS- 'Shanghai' != 'Beijing'?\n 2015-01-24 15:45:11,202 - INFO - Check-5: 'Shanghai City' =~ 'Country' -PASS- 'Shanghai City' =~ 'Country'\n 2015-01-24 15:45:11,202 - WARNING - ^^^ condition not met (pass due to -w option set) ^^^ \n 2015-01-24 15:45:11,203 - INFO - Check-6: Pass, not contains, regex can be used too -PASS- 'Shanghai City' !~ 'Country'?\n 2015-01-24 15:45:13,204 - DEBUG - vvv Results(-r 5 set) { 1:<11.960281812565919 > 15> 2:<12.284208523480407 > 15> 3:<15.89909604817515 > 15> } vvv\n 2015-01-24 15:45:13,204 - INFO - Check-7: random.uniform(1,20) > 15 -PASS- 15.89909604817515 > 15 - tried 3 times in 5 seconds\n\n\nBtw, you can change the log file and format by using test_steps functions.\n\n\nSee how to use check functions from test_steps module\n------------------------------------------------------\n\nhttps://pypi.python.org/pypi?:action=display&name=test_steps\n\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/steven004/nose-autochecklog", "keywords": "nosetest logging assert", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "nose-autochecklog", "package_url": "https://pypi.org/project/nose-autochecklog/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/nose-autochecklog/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/steven004/nose-autochecklog" }, "release_url": "https://pypi.org/project/nose-autochecklog/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "nose plugin - auto check condition and log all checks", "version": "0.1.1" }, "last_serial": 1393217, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "541dda7fc76463f244562ec8c209c4ac", "sha256": "8d5d3f69b4f0efe3645f3d9e8b8ecbe58f9a52d8e410b301ca7c13b135f87265" }, "downloads": -1, "filename": "nose-autochecklog-0.1.0.tar.gz", "has_sig": false, "md5_digest": "541dda7fc76463f244562ec8c209c4ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2793, "upload_time": "2015-01-22T12:42:54", "url": "https://files.pythonhosted.org/packages/54/46/06ad204a46f7d711549be59a8186c94ac02c1d20194b1ef4212ed7dfa791/nose-autochecklog-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "66c6a99b96019118d62e54e799756b7c", "sha256": "6815c62e1d2a263d021c1a70d089dd4fe41140219cdcdc24640bca21814a24fa" }, "downloads": -1, "filename": "nose-autochecklog-0.1.1.tar.gz", "has_sig": false, "md5_digest": "66c6a99b96019118d62e54e799756b7c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4862, "upload_time": "2015-01-23T13:35:39", "url": "https://files.pythonhosted.org/packages/b0/45/b98c96ed4c0d1da8d79e592cb00883c9cefeac4ff453d294840f3a55ade9/nose-autochecklog-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "66c6a99b96019118d62e54e799756b7c", "sha256": "6815c62e1d2a263d021c1a70d089dd4fe41140219cdcdc24640bca21814a24fa" }, "downloads": -1, "filename": "nose-autochecklog-0.1.1.tar.gz", "has_sig": false, "md5_digest": "66c6a99b96019118d62e54e799756b7c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4862, "upload_time": "2015-01-23T13:35:39", "url": "https://files.pythonhosted.org/packages/b0/45/b98c96ed4c0d1da8d79e592cb00883c9cefeac4ff453d294840f3a55ade9/nose-autochecklog-0.1.1.tar.gz" } ] }