{ "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 :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: Unix", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Quality Assurance", "Topic :: Software Development :: Testing", "Topic :: System :: Logging", "Topic :: Utilities" ], "description": "pytest plugin for test_steps auto check and log functions\n===============================================================\n\n.. image:: https://pypip.in/v/pytest_autochecklog/badge.png\n :target: https://crate.io/packages/pytest_autochecklog/\n\n.. image:: https://pypip.in/d/pytest_autochecklog/badge.png\n :target: https://crate.io/packages/pytest_autochecklog/\n\n\n**Please use pytest-oot plug-in, which provides same functions and much more.**\n\nThis pytest plugin is very simple, which is for users who use test_steps in py.test framework.\nUse this plugin, the function detection mechanism is using pytest runtest_setup to do it, instead of\nusing the original mechanism, which requires users know more about the auto-function-detection while\nwriting scripts originally.\nNow, it will be all set, while taken care of by this plugin.\n\n\nInstall pytest-autochecklog\n---------------------------\n\n::\n\n pip install pytest-autochecklog\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\nAfter installed the plugin for pytest, when you run pytest with the above test case,\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\n\nSee more information about 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/python-autochecklog", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "pytest-autochecklog", "package_url": "https://pypi.org/project/pytest-autochecklog/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pytest-autochecklog/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/steven004/python-autochecklog" }, "release_url": "https://pypi.org/project/pytest-autochecklog/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "automatically check condition and log all the checks", "version": "0.2.0" }, "last_serial": 1520376, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "a2c58e626eca540c7833ea6252e157b3", "sha256": "bf27d64f8a9036c510199a0b54741179a6dd41d74d60388a28725e290821435b" }, "downloads": -1, "filename": "pytest-autochecklog-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a2c58e626eca540c7833ea6252e157b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2689, "upload_time": "2015-01-21T13:18:28", "url": "https://files.pythonhosted.org/packages/c4/aa/9fe58fb7a1d6a8970a9948fea96880b675b380831af94cdfaa59db7066ab/pytest-autochecklog-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "5cd51f5915cf7a6c3d60eea8460200ee", "sha256": "6d7ca6df269c810082e8e1f66836cc2efb1ce0f48ec6ab807b85dd69e79ca4ae" }, "downloads": -1, "filename": "pytest-autochecklog-0.1.2.tar.gz", "has_sig": false, "md5_digest": "5cd51f5915cf7a6c3d60eea8460200ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3483, "upload_time": "2015-01-23T13:31:26", "url": "https://files.pythonhosted.org/packages/30/67/c59f27b68d0706a351cda53e13b17d113cc320123cedf3734f34c2df551c/pytest-autochecklog-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "80ec8d16262b14bc450c61aa58949e88", "sha256": "71eae9b35ec198e0dc34676d481a4dcfdcba9f658d3092c4bb852595746fc66b" }, "downloads": -1, "filename": "pytest-autochecklog-0.2.0.tar.gz", "has_sig": false, "md5_digest": "80ec8d16262b14bc450c61aa58949e88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3594, "upload_time": "2015-04-25T00:23:19", "url": "https://files.pythonhosted.org/packages/92/fd/0760880b86ed18be4da6148dcac37a326b63ce72552dcd1266e187562567/pytest-autochecklog-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "80ec8d16262b14bc450c61aa58949e88", "sha256": "71eae9b35ec198e0dc34676d481a4dcfdcba9f658d3092c4bb852595746fc66b" }, "downloads": -1, "filename": "pytest-autochecklog-0.2.0.tar.gz", "has_sig": false, "md5_digest": "80ec8d16262b14bc450c61aa58949e88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3594, "upload_time": "2015-04-25T00:23:19", "url": "https://files.pythonhosted.org/packages/92/fd/0760880b86ed18be4da6148dcac37a326b63ce72552dcd1266e187562567/pytest-autochecklog-0.2.0.tar.gz" } ] }