{ "info": { "author": "Floris Bruynooghe", "author_email": "flub@devork.be", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: Plugins", "Intended Audience :: Developers", "License :: DFSG approved", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Software Development :: Testing" ], "description": "==============\npytest-logbook\n==============\n\nCapture and show logbook logging output during test runs.\n\nThis pytest_ plugin provides will capture log messages emitted by\nlogbook and display them in their own section in the test report if\nthe test fails. Additionally it provides a fixture which provides\neasy access to the log records emitted during the test which allows\nmaking assertions on emitted log message. The plugin also sets up\nlogging redirection from the stdlib to go via logbook so any\nlibraries which use stdlib logging will also be captured.\n\n.. _pytest: http://pytest.org\n\n\nInstallation\n============\n\nInstall using pip::\n\n pip install pytest-logbook\n\n\nLog Capturing\n=============\n\nLog capturing happens automatically once installed, including stdlib\nlogging redirection::\n\n def test_foo():\n logbook.info('hello')\n logging.info('world')\n assert 0\n\n::\n\n $ py.test test_foo.py\n =========================== test session starts ============================\n platform linux -- Python 3.4.3, pytest-2.8.2, py-1.4.30, pluggy-0.3.1\n rootdir: /home/flub/Abilisoft/repos/pytest-logbook, inifile:\n plugins: logbook-0.1.0\n collected 1 items\n\n test_foo.py F\n\n ================================= FAILURES =================================\n _________________________________ test_foo _________________________________\n\n def test_foo():\n logbook.info('hello')\n logging.info('world')\n > assert 0\n E assert 0\n\n test_foo.py:7: AssertionError\n --------------------------- Logbook call records ---------------------------\n [INFO] Generic: hello\n [INFO] root: world\n ========================= 1 failed in 0.01 seconds =========================\n\nLogs messages emitted during test setup and teardown are also captured\nindividually. If setup fails you will see them in a \"Logbook setup\nrecords\" section and if teardown fails you will see the teardown log\nmessages in a \"Logbook teardown records\" section.\n\n\nFixtures\n========\n\nSeveral fixtures are provided to access the captured log records.\n\nloghandler\n Access the ``logbook.TestHandler`` instance active during the test\n run. You can use it to inspect the emitted log records, see the\n `full documentation`_ for details on how to use this object. Only\n log records emitted during the actual test are recorded here,\n records emitted during test setup or teardown are recorded in the\n other fixtures.\n\n.. _full documentation: http://pythonhosted.org//Logbook/api/handlers.html#logbook.TestHandler\n\nloghandler_setup\n Access the ``logbook.TestHandler`` instance active during the test\n setup.\n\nloghandler_teardown\n Access the ``logbook.TestHandler`` instance active during the test\n teardown.\n\n\nConfiguration\n=============\n\nThe plugin can be configured using options in the `py.test\nconfiguration file`_ in the standard ``[pytest]`` section.\n\n.. _py.test configuration file: http://pytest.org/latest/customize.html#initialization-determining-rootdir-and-inifile\n\n\nlogbook_stdlib\n This configures whether the stdlib logging is redirected to\n logbook. Set it to either ``true`` (default) or ``false``.\n\n\nChangelog\n=========\n\n1.2.0\n-----\n\n* Refactor internal workings to improve behaviour during keyboard\n interrupt and internal py.test errors. As a minor regression and to\n keep things simple log records are now only captured during test\n setup, call or teardown phases and are not captured during conftest\n loading or test collection. This is not an inherent limitation,\n only avoiding unneeded features.\n* Fix using fixture in a test method rather then just a test function.\n\n1.1.0\n-----\n\n* Do not fail if the application corrupts the Logbook stack.\n\n1.0.3\n-----\n\n* Require Logbook 0.11.3 to get the ``logging.compat`` module\n accessible.\n\n1.0.2\n-----\n\n* Include ``LICENSE``.\n* Add ``MANIFEST.in`` in ship LICENSE, tox.ini and test module.\n* Start keeping a changelog.\n* Fix dependency to require py.test >= 2.8 due to how hooks are\n implemented.\n\n1.0.1\n-----\n\n* Do not build universal wheel. Only tested/supported on python3.\n\n1.0.1\n-----\n\n* Initial release.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/flub/pytest-logbook", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pytest-logbook", "package_url": "https://pypi.org/project/pytest-logbook/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pytest-logbook/", "project_urls": { "Homepage": "http://bitbucket.org/flub/pytest-logbook" }, "release_url": "https://pypi.org/project/pytest-logbook/1.2.0/", "requires_dist": [ "Logbook (>=0.11.3)", "pytest (>=2.8)" ], "requires_python": "", "summary": "py.test plugin to capture logbook log messages", "version": "1.2.0" }, "last_serial": 1829890, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "eb1146898c506262f55082814226dec4", "sha256": "c76be89912b77405081838107ac60d3dc34c5cf31f48479ba4d9edd24fbc6d82" }, "downloads": -1, "filename": "pytest_logbook-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "eb1146898c506262f55082814226dec4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6163, "upload_time": "2015-11-12T13:00:33", "url": "https://files.pythonhosted.org/packages/5f/8f/d114e0f44364dec329da9c036d9b284e4d6d688125d960ec9aea66099af3/pytest_logbook-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f7d96964be5181b2e0e0bb9f5431884f", "sha256": "c351c18213a400f550ac97ba4aeee7813bc5333f9d60eacee5c01d6090444219" }, "downloads": -1, "filename": "pytest-logbook-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f7d96964be5181b2e0e0bb9f5431884f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3665, "upload_time": "2015-11-12T13:00:50", "url": "https://files.pythonhosted.org/packages/95/cd/b4eb6082f27f7c05c830396f65585d515ca71c9121de2e40a017f3187315/pytest-logbook-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "b612de1600cea7621b87b1af81d4ee6d", "sha256": "baf627cc691e3fa76a6f5280dcd9a61619938a91ba148d12f46bcca750ed87b8" }, "downloads": -1, "filename": "pytest_logbook-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b612de1600cea7621b87b1af81d4ee6d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6158, "upload_time": "2015-11-12T13:04:32", "url": "https://files.pythonhosted.org/packages/5e/c2/c00e12c79cae6b88f1880b67dbbcec9b06e7075f1eb944e7e5250f814252/pytest_logbook-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "922e9bb4bd38d4366f5db38052f520bc", "sha256": "a884ebe01bbe384289e9b60fe15b71610d19b40e4dd195177f4a82185b4a7924" }, "downloads": -1, "filename": "pytest-logbook-1.0.1.tar.gz", "has_sig": false, "md5_digest": "922e9bb4bd38d4366f5db38052f520bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3663, "upload_time": "2015-11-12T13:05:44", "url": "https://files.pythonhosted.org/packages/3b/2e/a1878aa6b9d6b3b1c2b55ecab42db4921f966ca75799254d170a475aadb6/pytest-logbook-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "2a49c7214e67930471586e791f8f62d5", "sha256": "9338085a40d06f258e8d8341463ee4ff0409451568655f9b604f5b7ccf2185a7" }, "downloads": -1, "filename": "pytest_logbook-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "2a49c7214e67930471586e791f8f62d5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6522, "upload_time": "2015-11-12T15:04:17", "url": "https://files.pythonhosted.org/packages/dd/59/d31407913e81a3cee8ecaabdba3f2c7bb4b9daa7341f6f0288631357b324/pytest_logbook-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eb64bbc7db9fd6467cef8af4655476e3", "sha256": "26e3ddaf7d1ee56d847c270780064263661d014d8f3ae7e50fbeb7170652f225" }, "downloads": -1, "filename": "pytest-logbook-1.0.2.tar.gz", "has_sig": false, "md5_digest": "eb64bbc7db9fd6467cef8af4655476e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5244, "upload_time": "2015-11-12T15:02:34", "url": "https://files.pythonhosted.org/packages/de/21/7c97b828f7ff8752a2a85ef295d29ac5e767fc86bed680c6bdb4e4f2bfe7/pytest-logbook-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "1c34d4d582e6540f557dcbe86416194f", "sha256": "31369b350a4c9941d6e357dd6fc2f9592dd5b1942a1c7abcb9662235d92189ab" }, "downloads": -1, "filename": "pytest_logbook-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "1c34d4d582e6540f557dcbe86416194f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6607, "upload_time": "2015-11-12T15:23:29", "url": "https://files.pythonhosted.org/packages/f1/5f/d3ed9ae8707f3444e402f7439506063a163435126577ea24b42b7f1c8fa9/pytest_logbook-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7006146853c7db71af20b5992755d13f", "sha256": "d9b379381a202cc87da764a60fef96be4f6beda788cb8d4b12434137529e3300" }, "downloads": -1, "filename": "pytest-logbook-1.0.3.tar.gz", "has_sig": false, "md5_digest": "7006146853c7db71af20b5992755d13f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5303, "upload_time": "2015-11-12T15:23:15", "url": "https://files.pythonhosted.org/packages/70/d5/ee8ea1911070998de9897a5dc08edac323b6e30c81a0ed61bf2a1cdd0567/pytest-logbook-1.0.3.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "6ce036e8b8899cd614ddb81a2a3f9ae9", "sha256": "4046bf8d37be433e64e46f64a8478d67de4262627afb53c69180e0cc30ef5af1" }, "downloads": -1, "filename": "pytest_logbook-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6ce036e8b8899cd614ddb81a2a3f9ae9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6835, "upload_time": "2015-11-17T15:59:42", "url": "https://files.pythonhosted.org/packages/b0/35/9b617959fe7a3f204839a7747a03082aa9abc487703a27e15daa942d4107/pytest_logbook-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a32f4aa5a887c49ca86ea1d771489ee7", "sha256": "092f24a6f6098e3ac27a8bcf600e5f097f86d008bbdc86dc4c06fcb708682dc9" }, "downloads": -1, "filename": "pytest-logbook-1.1.0.tar.gz", "has_sig": false, "md5_digest": "a32f4aa5a887c49ca86ea1d771489ee7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5547, "upload_time": "2015-11-17T15:59:48", "url": "https://files.pythonhosted.org/packages/e9/56/d0da25396fba5043a41bc78d27ad73cc0f7e076002d5b6b348981f65c8e2/pytest-logbook-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "b7cda0c72256e94ce66f4a4009afc6d8", "sha256": "e2e79cf188fdae3fc7c857a168a9f18a5d9cca6234f38795b3ff628d23e2be17" }, "downloads": -1, "filename": "pytest_logbook-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b7cda0c72256e94ce66f4a4009afc6d8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7354, "upload_time": "2015-11-23T18:51:01", "url": "https://files.pythonhosted.org/packages/fc/74/585cf76ac05324380cd7c847a824736d40b90882825c4d735f37190b596f/pytest_logbook-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f120e731ff643e2fbff37f197ba1c561", "sha256": "9454453230989a3d5149689c3449445554808d429b651a3d89c4464054a4c2dc" }, "downloads": -1, "filename": "pytest-logbook-1.2.0.tar.gz", "has_sig": false, "md5_digest": "f120e731ff643e2fbff37f197ba1c561", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5987, "upload_time": "2015-11-23T18:51:24", "url": "https://files.pythonhosted.org/packages/d0/1a/d3d5c361d6c5030ea2b0165081cb43e95d9e1624065dc383fb1cf35f4792/pytest-logbook-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b7cda0c72256e94ce66f4a4009afc6d8", "sha256": "e2e79cf188fdae3fc7c857a168a9f18a5d9cca6234f38795b3ff628d23e2be17" }, "downloads": -1, "filename": "pytest_logbook-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b7cda0c72256e94ce66f4a4009afc6d8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7354, "upload_time": "2015-11-23T18:51:01", "url": "https://files.pythonhosted.org/packages/fc/74/585cf76ac05324380cd7c847a824736d40b90882825c4d735f37190b596f/pytest_logbook-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f120e731ff643e2fbff37f197ba1c561", "sha256": "9454453230989a3d5149689c3449445554808d429b651a3d89c4464054a4c2dc" }, "downloads": -1, "filename": "pytest-logbook-1.2.0.tar.gz", "has_sig": false, "md5_digest": "f120e731ff643e2fbff37f197ba1c561", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5987, "upload_time": "2015-11-23T18:51:24", "url": "https://files.pythonhosted.org/packages/d0/1a/d3d5c361d6c5030ea2b0165081cb43e95d9e1624065dc383fb1cf35f4792/pytest-logbook-1.2.0.tar.gz" } ] }