{ "info": { "author": "mocobk", "author_email": "mocobk@163.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# BeautifulReport\n\n\u4e00\u4e2a\u57fa\u4e8eunittest.TestResult\u6a21\u5757\u5b9e\u73b0\u7684\u6d4b\u8bd5\u7528\u4f8b\u6a21\u677f, \u53ef\u628a\u6d4b\u8bd5\u4e2d\u7684\u7ed3\u679c\u901a\u8fc7BeautifulReport\u6574\u5408\u6210\u4e00\u4e2a\u53ef\u89c6\u5316\u7684\u62a5\u8868.\n\n### \u5982\u4f55\u4f7f\u7528\u5b83?\n\n```shell\n>>> pip install BeautifulReport\n```\n\n\n```python\n\nimport unittest\nfrom BeautifulReport import BeautifulReport\n\nif __name__ == '__main__':\n test_suite = unittest.defaultTestLoader.discover('./tests', pattern='test*.py')\n result = BeautifulReport(test_suite)\n result.report(filename='\u6d4b\u8bd5\u62a5\u544a', description='\u6d4b\u8bd5deafult\u62a5\u544a', report_dir='report', theme='theme_default')\n\n```\n\n### Report API\u7b80\u4ecb\n\n* BeautifulReport.report\n * report ( \n filename -> \u6d4b\u8bd5\u62a5\u544a\u540d\u79f0, \u5982\u679c\u4e0d\u6307\u5b9a\u9ed8\u8ba4\u6587\u4ef6\u540d\u4e3areport.html \n description -> \u6d4b\u8bd5\u62a5\u544a\u7528\u4f8b\u540d\u79f0\u5c55\u793a \n report_dir='.' -> \u62a5\u544a\u6587\u4ef6\u5199\u5165\u8def\u5f84 \n theme='theme_default' -> \u62a5\u544a\u4e3b\u9898\u6837\u5f0f theme_default theme_cyan theme_candy theme_memories \n )\n\n* BeautifulReport.add_test_img\n\n\u5982\u679c\u4f7f\u7528\u62a5\u544a\u8fc7\u7a0b\u4e2d\u9700\u8981\u628a\u6d4b\u8bd5\u62a5\u544a\u7684\u622a\u56fe\u653e\u5728\u62a5\u544a\u4e2d, \u53ef\u4ee5\u4f7f\u7528add_test_img\u65b9\u6cd5\n\n* add_test_img (\n *pargs\n)\n\n\u53ef\u4ee5\u5728\u6d4b\u8bd5\u7528\u4f8b\u4e0a\u6302\u8f7d\u4e00\u4e2a\u88c5\u9970\u5668, \u5b9e\u4f8b\u5185\u5bb9\u5982\u4e0b\n\n \n* \u9ed8\u8ba4\u5b58\u653e\u7684\u56fe\u7247\u8def\u5f84\u662fimg, \u9700\u8981\u5728\u5f53\u524d\u6d4b\u8bd5\u9879\u76ee\u7684\u542f\u52a8\u8def\u5f84\u4e0b, \u521b\u5efa\u4e00\u4e2aimg\u6587\u4ef6\u5939\n* \u4f20\u9012\u7ed9\u88c5\u9970\u5668\u7684\u56fe\u7247,\u5728\u8fd0\u884c\u6d4b\u8bd5\u524d\u53ef\u4ee5\u4e0d\u5b58\u5728, \u8fd0\u884c\u6d4b\u8bd5\u4e4b\u540e\u751f\u6210\u5373\u53ef.\n* \u5f53\u6587\u4ef6\u5728\u62a5\u544a\u4e2d\u5c55\u793a\u540e, \u60f3\u8981\u770b\u5230\u539f\u56fe, \u53ef\u4ee5\u70b9\u51fb\u62a5\u544a\u4e2d\u7684\u7f29\u7565\u56fe\u67e5\u770b\u5b8c\u6574\u7684\u622a\u56fe\n\n```python\nimport unittest\nfrom BeautifulReport import BeautifulReport\n\n\nclass UnittestCaseSecond(unittest.TestCase):\n \"\"\" \u6d4b\u8bd5\u4ee3\u7801\u751f\u6210\u4e0eloader \u6d4b\u8bd5\u6570\u636e\"\"\"\n \n def test_equal(self):\n \"\"\"\n test 1==1\n :return:\n \"\"\"\n import time\n time.sleep(1)\n self.assertTrue(1 == 1)\n \n @BeautifulReport.add_test_img('\u6d4b\u8bd5\u62a5\u544a.png')\n def test_is_none(self):\n \"\"\"\n test None object\n :return:\n \"\"\"\n save_some_img('\u6d4b\u8bd5\u62a5\u544a.png')\n self.assertIsNone(None)\n```\n\n* \u8fd0\u884csample\u4e4b\u540e\u751f\u6210\u5982\u4e0b\u62a5\u544a\n\n![image](http://mocobk.test.upcdn.net/image/img20190325125101.jpg)\n\n* \u4e3b\u9898\u6837\u5f0f\n\n![image](http://mocobk.test.upcdn.net/image/img20190325124850.jpg)\n\n\u611f\u8c22\u539f\u4f5c\u8005 [TesterlifeRaymond](https://github.com/TesterlifeRaymond/BeautifulReport) \u7684\u4ee3\u7801\u8d21\u732e\uff0c\u672c\u4eba\u5728\u539f\u57fa\u7840\u4e0a\u4fee\u590d\u4e86\u90e8\u5206bug\u5e76\u589e\u52a0\u4e86\u4e3b\u9898\u6837\u5f0f\u7684\u81ea\u5b9a\u4e49", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mocobk/BeautifulReport", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "BeautifulReport", "package_url": "https://pypi.org/project/BeautifulReport/", "platform": "", "project_url": "https://pypi.org/project/BeautifulReport/", "project_urls": { "Homepage": "https://github.com/mocobk/BeautifulReport" }, "release_url": "https://pypi.org/project/BeautifulReport/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "unittest\u81ea\u52a8\u5316\u6d4b\u8bd5\u7684\u53ef\u89c6\u5316\u62a5\u544a\u6a21\u677f", "version": "0.1.2" }, "last_serial": 5958325, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "c0d9735ac12ae3175035f41dc1277a69", "sha256": "577219cb606bb0868cb4500b0673547a4d8cddf6f9103bb29a830c43176e0a7a" }, "downloads": -1, "filename": "BeautifulReport-0.0.1.tar.gz", "has_sig": false, "md5_digest": "c0d9735ac12ae3175035f41dc1277a69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2596, "upload_time": "2019-03-20T12:41:27", "url": "https://files.pythonhosted.org/packages/89/cf/7e30a4965e756f00b58805994826494420c49c80604bd11b6695c8c34de8/BeautifulReport-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "a827be54b9d12528ef2cda7a18a7956e", "sha256": "735669b23293ab88117b9448999cab801972a2f4be3f09f7c250de45efe52549" }, "downloads": -1, "filename": "BeautifulReport-0.0.2.tar.gz", "has_sig": false, "md5_digest": "a827be54b9d12528ef2cda7a18a7956e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29773, "upload_time": "2019-03-20T13:05:59", "url": "https://files.pythonhosted.org/packages/49/87/41b245c0e92f07ed437c346f26eca8ea1eda2d2422fef7f95a73fb091a82/BeautifulReport-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "5d30be10aee6fad94b1f1ec326de828c", "sha256": "881569eaf5e3f83a3a05cadad8df0a1327cc3a3eeb328231068a0bfc8e8d5b25" }, "downloads": -1, "filename": "BeautifulReport-0.0.3.tar.gz", "has_sig": false, "md5_digest": "5d30be10aee6fad94b1f1ec326de828c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29652, "upload_time": "2019-03-20T13:26:22", "url": "https://files.pythonhosted.org/packages/78/cf/063f634dc9a7bc30aa478cac195a5a6fb30034217698a6d3e4d04101d595/BeautifulReport-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "8db4eac8612b8bf388063319536cc3f4", "sha256": "3e49c9edd8daf11caaa32e3a2e5fedb171142ecb47370c1885d622381ffacc16" }, "downloads": -1, "filename": "BeautifulReport-0.0.4.tar.gz", "has_sig": false, "md5_digest": "8db4eac8612b8bf388063319536cc3f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29647, "upload_time": "2019-03-20T13:29:59", "url": "https://files.pythonhosted.org/packages/bb/b8/32c3e08ba437db1fb955c9ba9be86e2eae29accf1158be552ba62d108884/BeautifulReport-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "b20f38d8679a19046be4e96d8d8f7162", "sha256": "a4232eb7f230e6944cf1b59d4a78eecba05aa06f8d7307f63e6df0f7098e006c" }, "downloads": -1, "filename": "BeautifulReport-0.0.5.tar.gz", "has_sig": false, "md5_digest": "b20f38d8679a19046be4e96d8d8f7162", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30112, "upload_time": "2019-03-25T05:00:06", "url": "https://files.pythonhosted.org/packages/d0/29/d99ddb27d3127058770e37f98d8476af11d2bb5b9a48a8ab930c374ef1ba/BeautifulReport-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "c8b2fc0528de03de040d6ad0a82b6868", "sha256": "4001f2a366e14bfbc36bfd353d19f48d57c9a45158fb32490c1b331e240f37f3" }, "downloads": -1, "filename": "BeautifulReport-0.0.6.tar.gz", "has_sig": false, "md5_digest": "c8b2fc0528de03de040d6ad0a82b6868", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30208, "upload_time": "2019-03-25T06:40:39", "url": "https://files.pythonhosted.org/packages/42/cf/f00229f1b5197d7a98cd4d36fe3c15161195e7cc871d046490c1e0c58939/BeautifulReport-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "a9c441b0806804978133cb4650291d5d", "sha256": "4ee4d4f9f9025b8d3610494a6f1e5dbbad27a4f5df8a2b13305001c4738c2c2f" }, "downloads": -1, "filename": "BeautifulReport-0.0.7.tar.gz", "has_sig": false, "md5_digest": "a9c441b0806804978133cb4650291d5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30215, "upload_time": "2019-03-25T07:55:09", "url": "https://files.pythonhosted.org/packages/3b/47/5554df879105d81873fa601ba52b62899c56c8cd14280992e4d627bb9bd3/BeautifulReport-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "cafe916255d52b56bc4c673b9634056a", "sha256": "1ecb67850d82a188b783751fe7d0a705077baeaaa83f4c448e43711f10feaa5f" }, "downloads": -1, "filename": "BeautifulReport-0.0.8.tar.gz", "has_sig": false, "md5_digest": "cafe916255d52b56bc4c673b9634056a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30328, "upload_time": "2019-04-15T13:03:52", "url": "https://files.pythonhosted.org/packages/d5/72/32ba3b9ddf4dca0c1a02e70061e5e8f3b95869ce33fa631731dc5efa24c3/BeautifulReport-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "3604726c829ba1b60ec783662a0cd78c", "sha256": "6283c26cf6077a1b8b4df7a3411c309b597c52f0babcf046d8de6e904f0d8282" }, "downloads": -1, "filename": "BeautifulReport-0.0.9.tar.gz", "has_sig": false, "md5_digest": "3604726c829ba1b60ec783662a0cd78c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31020, "upload_time": "2019-04-16T11:55:24", "url": "https://files.pythonhosted.org/packages/40/43/ab7e3070a3aa9098fb6c529c9db48d62cd9bc4dc52347ff9df3e1d263d20/BeautifulReport-0.0.9.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "3a100b124bcfed6a7e971e5eec9e437d", "sha256": "863f97ac805e823e35dd9619aebff9ec627bed7b54509d03cd3ba2ed640ce42b" }, "downloads": -1, "filename": "BeautifulReport-0.1.0.tar.gz", "has_sig": false, "md5_digest": "3a100b124bcfed6a7e971e5eec9e437d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31022, "upload_time": "2019-07-05T02:57:08", "url": "https://files.pythonhosted.org/packages/89/d4/ab1ab5baf8796f962582c6cad2ac046b1301efa46436c191e0c5d64563ff/BeautifulReport-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "5b1ae4633cb7a85840c7c0a62239694f", "sha256": "112805767f8b3e10f7098b17088e27bbb2d3c73136deba6d6bc7fd28fb5fbd36" }, "downloads": -1, "filename": "BeautifulReport-0.1.1.tar.gz", "has_sig": false, "md5_digest": "5b1ae4633cb7a85840c7c0a62239694f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30957, "upload_time": "2019-07-26T02:21:54", "url": "https://files.pythonhosted.org/packages/5c/0b/d8caada91868f244265496c11f5627ed55c0e59c8d39cc6e03cab85bea8d/BeautifulReport-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "7aadf17db7ab84c618f115ae88d5c450", "sha256": "37f38602f31557f8e76719377b15dc61b1351a712df53016d2c0d5a64a81531f" }, "downloads": -1, "filename": "BeautifulReport-0.1.2.tar.gz", "has_sig": false, "md5_digest": "7aadf17db7ab84c618f115ae88d5c450", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30966, "upload_time": "2019-10-11T04:24:26", "url": "https://files.pythonhosted.org/packages/39/49/041ecae1b693d3f261ee854d4f45c125e074054136ddf69ad534631cf735/BeautifulReport-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7aadf17db7ab84c618f115ae88d5c450", "sha256": "37f38602f31557f8e76719377b15dc61b1351a712df53016d2c0d5a64a81531f" }, "downloads": -1, "filename": "BeautifulReport-0.1.2.tar.gz", "has_sig": false, "md5_digest": "7aadf17db7ab84c618f115ae88d5c450", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30966, "upload_time": "2019-10-11T04:24:26", "url": "https://files.pythonhosted.org/packages/39/49/041ecae1b693d3f261ee854d4f45c125e074054136ddf69ad534631cf735/BeautifulReport-0.1.2.tar.gz" } ] }