{ "info": { "author": "Luke Baal", "author_email": "lukebaal2020@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Pest Control\n\nA Python Unit Testing Library\n\n## Usage\n\nTest Functions:\n- assertEquals(actual, expected, msg) - Test if actual = expected, if test fails, print out includes msg\n- assertTrue(actual, msg) - Test if actual = True, if test fails, print out includes msg\n- assertFalse(actual, msg) - Test if actual = False, if test fails, print out includes msg\n\n### How to\n\nStart by importing the library. Assuming file is in same directory as the PestControl library directory:\nfor example for the test script \"basic_test.py\", use the following folder structure for this example:\n```\n/\n|- pestcontrol/\n|\t- pest_control.py\n|- basic_test.py\n```\n\n```python\nimport pestcontrol\n```\n\nThen make a class that extends PestCase to be the unit test class (class name can be anything, \"BasicTestCase\" is used here)\n```python\nclass BasicTestCase(pestcontrol.PestCase):\n```\n\nThen write one or more functions for the actual test. NOTE: \"test\" MUST be somewhere in the function name.\nFor example, add_test(), addTest(), addTesting(), add_Tester(), add_tester(), will all run, but add(), will not run.\n```python\nclass BasicTestCase(PestCase):\n def add_test(self):\n self.assertEquals(1+1, 2, \"simple add test\")\n```\n\nNow just add the main() funciton call\n```python\nif __name__ == \"__main__\":\n BasicTestCase().main()\n```\n\nThat's it! Your unit test will run and print to the console the results. Note: any errors that occur from a call to an assert function, ie errors caused by the code being tested, will be caught and logged as a failed test (divide by zero error for example).\n\nFull Example:\n```python\nimport pestcontrol\nclass BasicTestCase(pestcontrol.PestCase):\n def add_test(self):\n self.assertEquals(1+1, 2, \"simple add test\")\n\nif __name__ == \"__main__\":\n BasicTestCase().main()\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/LukeBaal/PestControl", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pestcontrol", "package_url": "https://pypi.org/project/pestcontrol/", "platform": "", "project_url": "https://pypi.org/project/pestcontrol/", "project_urls": { "Homepage": "https://gitlab.com/LukeBaal/PestControl" }, "release_url": "https://pypi.org/project/pestcontrol/1.0.5/", "requires_dist": [ "colorama" ], "requires_python": "", "summary": "A Python unit testing library", "version": "1.0.5" }, "last_serial": 4082564, "releases": { "1.0.5": [ { "comment_text": "", "digests": { "md5": "2dc773c1e38325754e5af43206cd4dee", "sha256": "31ffafc1b39303a53d395cd5f0807fcda4fe20bad02e52cee7310e0bbe3c78f4" }, "downloads": -1, "filename": "pestcontrol-1.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "2dc773c1e38325754e5af43206cd4dee", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4450, "upload_time": "2018-07-19T15:04:06", "url": "https://files.pythonhosted.org/packages/fa/8c/748905a0ce5a03d7c7b12ddce61e5d4acb20293fdfd35233976c6d8dc339/pestcontrol-1.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "841c394fee212fc1aaf88eba43f0f7c3", "sha256": "91a0bbdebc5980b3f0141231a893ccfd4a318b555d0a42c4de29dbb9ab268ea3" }, "downloads": -1, "filename": "pestcontrol-1.0.5.tar.gz", "has_sig": false, "md5_digest": "841c394fee212fc1aaf88eba43f0f7c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3913, "upload_time": "2018-07-19T15:04:07", "url": "https://files.pythonhosted.org/packages/6f/72/8a86176ea0e364e7115be96dcf676c39ec4c9688c849ac222c2c3f9d7e96/pestcontrol-1.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2dc773c1e38325754e5af43206cd4dee", "sha256": "31ffafc1b39303a53d395cd5f0807fcda4fe20bad02e52cee7310e0bbe3c78f4" }, "downloads": -1, "filename": "pestcontrol-1.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "2dc773c1e38325754e5af43206cd4dee", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4450, "upload_time": "2018-07-19T15:04:06", "url": "https://files.pythonhosted.org/packages/fa/8c/748905a0ce5a03d7c7b12ddce61e5d4acb20293fdfd35233976c6d8dc339/pestcontrol-1.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "841c394fee212fc1aaf88eba43f0f7c3", "sha256": "91a0bbdebc5980b3f0141231a893ccfd4a318b555d0a42c4de29dbb9ab268ea3" }, "downloads": -1, "filename": "pestcontrol-1.0.5.tar.gz", "has_sig": false, "md5_digest": "841c394fee212fc1aaf88eba43f0f7c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3913, "upload_time": "2018-07-19T15:04:07", "url": "https://files.pythonhosted.org/packages/6f/72/8a86176ea0e364e7115be96dcf676c39ec4c9688c849ac222c2c3f9d7e96/pestcontrol-1.0.5.tar.gz" } ] }