{ "info": { "author": "Tony Flury", "author_email": "anthony.flury@btinternet.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=======================\nRepeated Test Framework\n=======================\n\n\n.. image:: https://img.shields.io/pypi/v/repeated-test-framework.svg\n :target: https://pypi.python.org/pypi/repeated-test-framework\n\n\n.. image:: https://travis-ci.org/TonyFlury/repeatedtestframework.png?branch=master\n :target: https://travis-ci.org/TonyFlury/repeatedtestframework/\n\n.. image:: https://codecov.io/github/TonyFlury/repeatedtestframework/coverage.svg?branch=master\n :target: https://codecov.io/github/TonyFlury/repeatedtestframework?branch=master\n\n.. image:: https://readthedocs.org/projects/repeatedtestframework/badge/?version=latest\n :target: https://readthedocs.org/projects/repeatedtestframework/?badge=latest\n\n------------\nIntroduction\n------------\nThe repeated Test Framework is designed to be used with the ``unittest`` standard library module (`unittest for Python 2.7`_, `unittest for Python 3.5`_), to\nmake to generate multiple test cases against the same functionality\nwhere the difference between the test cases is different test input and\ndiffering expected results.\n\nFeatures\n--------\n\nThe Framework provides the following features :\n\n - Supports Python 2 and Python 3\n - Easy to use\n\n - Uses a list of dictionaries (or any Iterable of mappings) to define the data for the test cases.\n - Requires only a single generic test function which takes the test case data and executes the test of the functionality.\n - Can decorate a entirely empty `unittest.TestCase`_ class - no boiler plate coded needed within the class.\n - Using the default settings, ensures a unique and predictable set of test method names, and useful documentation strings for each test case.\n - The automatically generated test methods work correctly with `unittest module`_ module default test detection, loaders, execution and reporting functionality.\n - Supports the use of the normal commandline usage of the `unittest module`_, including execution of specific test cases.\n\n - Behind the scenes\n\n - Automatically generates a test method on a `unittest.TestCase`_, one for each entry the test data list/Iterable.\n - By generating unique documentation strings and test names, ensures useful test result reporting from the `unittest module`_.\n - By generating multiple test methods, ensures test separation so that testing continues after a test failure.\n\n - Also\n\n - Allows for customisation of the name and the documentation strings of the generated test method, using any of the data from the relevant test_case.\n - Provides additional decorators allowing the application of `unittest test method decorators`_ (``skip``, ``skipIf`` etc) to one or more of the automatically generated test cases. Can also apply your own arbitrary test method decorators to the generated test case methods.\n - Can combine Automatically generated test methods and explicitly provided test method on the same `unittest.TestCase`_ class.\n\nSee `Using the Framework`_ for full details of how to use the Framework, including how to customise the Framework, and how to apply decorators to the generated test methods.\n\nSee `Why Use the Framework`_ for a more detailed comparison of the Framework against other traditional ways of using the unittest module to achieve the same multiple test cases for the same functionality item with different data.\n\n------------\nInstallation\n------------\n\nInstallation is very simple :\n\n.. code-block:: bash\n\n $ pip install repeated-test-framework\n\nTo upgrade an existing installation use\n\n.. code-block:: bash\n\n $ pip install --upgrade repeated-test-framework\n\n---------------\nGetting Started\n---------------\n\nThe following code snippet will illustrate the simplest use of the Framework to execute a small number of test case\nagainst the multiplication operation - a trivial example which is still illustrative of the key points.\n\n.. code-block:: python\n\n from repeatedtestframework import GenerateTestMethods\n\n def test_method_wrapper(index, a, b, result):\n def test_method(self):\n \"\"\"The actual test method which gets replicated\"\"\"\n self.assertEqual( a * b, result)\n return test_method_wrapper\n\n @GenerateTestMethods(\n test_name = 'test_multiplication',\n test_method = test_method_wrapper,\n test_input = [ {'a':1, 'b';2, 'result':2 },\n {'a':2, 'b':2, 'result':4 },\n {'a':3, 'b':2, 'result':6 },\n {'a':3, 'b':4, 'result':11 } ] )\n class TestCases(unittest.TestCase):\n pass\n\nAlthough the example above is trivial, it does illustrate the key features of the framework as noted.\n\n - The data to be used is provided as a list of dictionaries; the ``input_data`` attribute on the GenerateTestMethods decorator.\n - A ``test_name`` attribute is provided - which is a human readable string which is included verbatim into the test method name - as such it can only include alphabetic, numeric and underscore (`_`) characters.\n - Regardless of the number of test data items the decorator only needs a a single test execution method (``test_method`` in the example) is required. The Framework replicates this method into the multiple test methods on the decorated class.\n - The framework does require the test function to be wrapped in method which accepts the attributes from the ``input_data`` iterator - in the example below this wrapping function is ``test_method_wrapper``. As shown in the example, the wrapper function it does not need to do anything at all other than wrap the test function, and accept the test data as a set of arguments which can then be used by the wrapped test function.\n - The `unittest.TestCase`_ class being decorated by the Framework can be entirely empty (as in the example), or it can include set Up and clear down methods as required by the test cases, or it could even include one or more `hand-written` test case methods (so long as the method names do not clash).\n\n\n-------------------\nFurther Information\n-------------------\n\n- `Full Documentation`_\n- `On PyPi (Python Package Index)`_\n- `Source code on GitHub`_\n\n----------------------\nTroubleshooting & Bugs\n----------------------\n\n.. note::\n Every care is taken to try to ensure that this code comes to you bug free.\n If you do find an error - please report the problem on :\n\n - `GitHub Issues`_\n - By email to : `Tony Flury`_\n\n-------\nLicense\n-------\n\nThis software is covered by the provisions of `Apache Software License 2.0`_ License.\n\n\n\n.. _Github Issues: http://github.com/TonyFlury/repeatedtestframework/issues/new\n.. _Tony Flury: mailto:anthony.flury@btinternet.com?Subject=repeatedtestframework%20Error\n\n.. _Full Documentation: http://repeatedtestframework.readthedocs.org/en/latest/\n.. _Why Use the Framework: http://repeatedtestframework.readthedocs.io/en/latest/WhyUse.html\n.. _Using the Framework: http://repeatedtestframework.readthedocs.io/en/latest/using.html\n.. _unittest module: https://docs.python.org/3.5/library/unittest.html\n.. _unittest.TestCase: https://docs.python.org/3.5/library/unittest.html#unittest.TestCase\n.. _unittest test method decorators: https://docs.python.org/3.5/library/unittest.html#unittest-skipping\n.. _On PyPi (Python Package Index): https://pypi.python.org/pypi/repeatedtestframework\n.. _Source code on GitHub: http://github.com/TonyFlury/repeatedtestframework\n.. _Apache Software License 2.0: http://repeatedtestframework.readthedocs.org/en/latest/LICENSE.rst\n.. _unittest for Python 2.7: https://docs.python.org/2.7/\n.. _unittest for Python 3.5: https://docs.python.org/3.5/\n\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://repeatedtestframework.readthedocs.org/en/latest/", "keywords": "unittest repetition", "license": "GNU General Public License (GPL)", "maintainer": "", "maintainer_email": "", "name": "Repeated-Test-Framework", "package_url": "https://pypi.org/project/Repeated-Test-Framework/", "platform": "", "project_url": "https://pypi.org/project/Repeated-Test-Framework/", "project_urls": { "Homepage": "http://repeatedtestframework.readthedocs.org/en/latest/" }, "release_url": "https://pypi.org/project/Repeated-Test-Framework/0.1.1rc2/", "requires_dist": [ "six", "check-manifest; extra == 'dev'", "coverage; extra == 'test'" ], "requires_python": "", "summary": "Repeated Test Framework: Helper functionality to reduce the amount of boiler plate or repeated code which is implemented when the same functionality is tested multiple times with different data.", "version": "0.1.1rc2" }, "last_serial": 3071221, "releases": { "0.1.0rc1": [ { "comment_text": "", "digests": { "md5": "3a6586c404478261fa0f0123fb1c2ff3", "sha256": "fd755a49ce67b8b3273121935911383c0d77c96fa86796465b7f42e25ce95a45" }, "downloads": -1, "filename": "Repeated_Test_Framework-0.1.0rc1-py2-none-any.whl", "has_sig": false, "md5_digest": "3a6586c404478261fa0f0123fb1c2ff3", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 11576, "upload_time": "2017-01-27T04:27:42", "url": "https://files.pythonhosted.org/packages/47/ac/5cafe7ad79d44ca69c7976b0e00df05e4d9f52f5bd3e9a932df634ad319d/Repeated_Test_Framework-0.1.0rc1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ba4a622a9e8b9ae30716525e93c3207b", "sha256": "e6aa771043afaa794009cb7fbf724547d20077994817b5554de573228e193aaa" }, "downloads": -1, "filename": "Repeated_Test_Framework-0.1.0rc1-py3-none-any.whl", "has_sig": false, "md5_digest": "ba4a622a9e8b9ae30716525e93c3207b", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 11576, "upload_time": "2017-01-27T04:26:00", "url": "https://files.pythonhosted.org/packages/d4/09/3fab9d922056f49df619f60d1ab68adff505b067246bba6dd9603027238c/Repeated_Test_Framework-0.1.0rc1-py3-none-any.whl" } ], "0.1.1rc1": [ { "comment_text": "", "digests": { "md5": "72a8d95573e0822eccef9962353c0f8b", "sha256": "5312d5aa11f83a1821eedd8ea3728af4d191939927b06161f858964a68e25b91" }, "downloads": -1, "filename": "Repeated_Test_Framework-0.1.1rc1-py2-none-any.whl", "has_sig": false, "md5_digest": "72a8d95573e0822eccef9962353c0f8b", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 11624, "upload_time": "2017-01-27T08:15:18", "url": "https://files.pythonhosted.org/packages/f1/39/224c5c61e301cd8ad4cf1908fabedb8af0fc970a56fc13e3360aefa69131/Repeated_Test_Framework-0.1.1rc1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "899fcd9a133db6ccb041df312b8297f1", "sha256": "58066aa5aad0c36dd96a8db1de64ca29f9ef6790819fba5be442c30b5dccd9c9" }, "downloads": -1, "filename": "Repeated_Test_Framework-0.1.1rc1-py3-none-any.whl", "has_sig": false, "md5_digest": "899fcd9a133db6ccb041df312b8297f1", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 11623, "upload_time": "2017-01-27T08:15:46", "url": "https://files.pythonhosted.org/packages/20/40/fa74db4b681bf167e85296a1dd46230d8aa0f8e60cb5e181b017115518ac/Repeated_Test_Framework-0.1.1rc1-py3-none-any.whl" } ], "0.1.1rc2": [ { "comment_text": "", "digests": { "md5": "c6be3d0e1e9b90d4ceba8336dc59f973", "sha256": "725326e68aa7fbc1a1dcc2c38d4aea85685d9b0a5683ac49ee2884af4f155b9a" }, "downloads": -1, "filename": "Repeated_Test_Framework-0.1.1rc2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c6be3d0e1e9b90d4ceba8336dc59f973", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11721, "upload_time": "2017-08-03T22:52:43", "url": "https://files.pythonhosted.org/packages/d5/8b/76dd30223ef6deebea157708b8d7a9821e797a679726628518f29d59d0be/Repeated_Test_Framework-0.1.1rc2-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c6be3d0e1e9b90d4ceba8336dc59f973", "sha256": "725326e68aa7fbc1a1dcc2c38d4aea85685d9b0a5683ac49ee2884af4f155b9a" }, "downloads": -1, "filename": "Repeated_Test_Framework-0.1.1rc2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c6be3d0e1e9b90d4ceba8336dc59f973", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11721, "upload_time": "2017-08-03T22:52:43", "url": "https://files.pythonhosted.org/packages/d5/8b/76dd30223ef6deebea157708b8d7a9821e797a679726628518f29d59d0be/Repeated_Test_Framework-0.1.1rc2-py2.py3-none-any.whl" } ] }