{ "info": { "author": "Ian Hutchinson", "author_email": "ihutchinson@agalmicventures.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "\n# PyTestStub\nPyTestStub reads your Python code to generate unit test stubs. Given a module name,\nit walks each file in the module. If it encounters a file without a\ncorresponding test file, it generates one with test stubs for each function\nand class method in the file.\n\nBesides reducing time spent on boilerplate, this approach ensures complete\ncoverage when creating new tests, so developers can focus on the actual tests.\nAfter generation, rework is limited to removing unneeded stubs and duplicating\nthose which require multiple tests (copy+paste). The resulting skeleton is\nsufficiently complete to delegate the test implementation to another developer.\n\n## Installation\nTo install, simply use `pip`:\n\n\t> python3 -m pip install PyTestStub\n\n## Scripts\n\n### `GenerateUnitTests.py`\nGenerates the actual unit tests, with options like a header file to prepend as\na license:\n\n\t> python3 -m PyTestStub.GenerateUnitTests -h\n\tusage: GenerateUnitTests.py [-h] [-F FOOTER] [-H HEADER] [-f] [-m TEST_MODULE]\n\t [-p TEST_PREFIX] [-t TAB_WIDTH]\n\t module\n\n\tPython Unit Test Stub Generator\n\n\tpositional arguments:\n\t module The path of the module to test.\n\n\toptional arguments:\n\t -h, --help show this help message and exit\n\t -F FOOTER, --footer FOOTER\n\t File to use as a footer.\n\t -H HEADER, --header HEADER\n\t File to use as a header.\n\t -f, --force Force files to be generated, even if they already\n\t exist.\n\t -m TEST_MODULE, --test-module TEST_MODULE\n\t The path of the test module to generate.\n\t -p TEST_PREFIX, --test-prefix TEST_PREFIX\n\t The prefix for test files.\n\t -t TAB_WIDTH, --tab-width TAB_WIDTH\n\t The width of a tab in spaces (default actual tabs).\n\nOutput is simple and human readable:\n\n\t> python3 -m PyTestStub.GenerateUnitTests PyTestStub\n\tNo classes or functions in PyTestStub/__init__.py\n\tWriting test to test/test_Generator.py\n\tNo classes or functions in PyTestStub/Templates.py\n\nOutput files have stubs for everything but are easily pruned if e.g. setup\nmethods are not needed:\n\n\timport unittest\n\n\tclass GeneratorTest(unittest.TestCase):\n\t\t\"\"\"\n\t\tTests for functions in the Generator module.\n\t\t\"\"\"\n\n\t\t@classmethod\n\t\tdef setUpClass(cls):\n\t\t\tpass #TODO\n\n\t\t@classmethod\n\t\tdef tearDownClass(cls):\n\t\t\tpass #TODO\n\n\t\tdef setUp(self):\n\t\t\tpass #TODO\n\n\t\tdef tearDown(self):\n\t\t\tpass #TODO\n\n\t\tdef test_generateUnitTest(self):\n\t\t\traise NotImplementedError() #TODO: test generateUnitTest\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://github.com/AgalmicVentures/PyTestStub/", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "PyTestStub", "package_url": "https://pypi.org/project/PyTestStub/", "platform": "", "project_url": "https://pypi.org/project/PyTestStub/", "project_urls": { "Homepage": "https://github.com/AgalmicVentures/PyTestStub/" }, "release_url": "https://pypi.org/project/PyTestStub/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "Reads your Python code to generate unit test stubs", "version": "0.0.2" }, "last_serial": 5235631, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "37c9c0debd754ff7b235fbdece913662", "sha256": "f3f2e52ef876221bf6b9a761ca792a04b0b4af6b80bab4ee7a961aef538463b4" }, "downloads": -1, "filename": "PyTestStub-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "37c9c0debd754ff7b235fbdece913662", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8647, "upload_time": "2019-05-07T01:16:07", "url": "https://files.pythonhosted.org/packages/ce/15/481601970ec1a18899543d568b2ade6fe2e278b8f926181fd5e0a0372b74/PyTestStub-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4c2c2dd4f7ab672331b1970ce50bee4c", "sha256": "c4bb3ca9fe15b350cb2c5974c911aaaf6fd3c43a802d7c5e094aca865fb625aa" }, "downloads": -1, "filename": "PyTestStub-0.0.1.tar.gz", "has_sig": false, "md5_digest": "4c2c2dd4f7ab672331b1970ce50bee4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4999, "upload_time": "2019-05-07T01:16:09", "url": "https://files.pythonhosted.org/packages/12/af/776310722eda0f31ddf09eff9d23ee124f6a697b72feb8e8e20f3012c037/PyTestStub-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "87b172f365a0fb5d51637f30cc05c5f5", "sha256": "38df61418fb9dc0a34dbd066f2cffc988eed993f24f1180b981db9f2f3f75bd9" }, "downloads": -1, "filename": "PyTestStub-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "87b172f365a0fb5d51637f30cc05c5f5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8691, "upload_time": "2019-05-07T01:19:15", "url": "https://files.pythonhosted.org/packages/5b/22/d5c93882ea426372bf6cbfd4d9c60a474317f4a2ecca6091d4abab1aedc5/PyTestStub-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "20e44a012ade599835961b4ca8036633", "sha256": "33de533fb21332043a42951d9ad7dda5d6989d61ffc3aca089a49b0bbcf4ef7c" }, "downloads": -1, "filename": "PyTestStub-0.0.2.tar.gz", "has_sig": false, "md5_digest": "20e44a012ade599835961b4ca8036633", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5047, "upload_time": "2019-05-07T01:19:17", "url": "https://files.pythonhosted.org/packages/2f/c0/e6e57d3b6a11c955c0570e1b60f7881064df138a941db42c7b019b691fa5/PyTestStub-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "87b172f365a0fb5d51637f30cc05c5f5", "sha256": "38df61418fb9dc0a34dbd066f2cffc988eed993f24f1180b981db9f2f3f75bd9" }, "downloads": -1, "filename": "PyTestStub-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "87b172f365a0fb5d51637f30cc05c5f5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8691, "upload_time": "2019-05-07T01:19:15", "url": "https://files.pythonhosted.org/packages/5b/22/d5c93882ea426372bf6cbfd4d9c60a474317f4a2ecca6091d4abab1aedc5/PyTestStub-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "20e44a012ade599835961b4ca8036633", "sha256": "33de533fb21332043a42951d9ad7dda5d6989d61ffc3aca089a49b0bbcf4ef7c" }, "downloads": -1, "filename": "PyTestStub-0.0.2.tar.gz", "has_sig": false, "md5_digest": "20e44a012ade599835961b4ca8036633", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5047, "upload_time": "2019-05-07T01:19:17", "url": "https://files.pythonhosted.org/packages/2f/c0/e6e57d3b6a11c955c0570e1b60f7881064df138a941db42c7b019b691fa5/PyTestStub-0.0.2.tar.gz" } ] }