{ "info": { "author": "Hartmut Goebel", "author_email": "h.goebel@crazy-compilers.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development", "Topic :: Utilities" ], "description": "==================================\nunittest2pytest\n==================================\n\n-----------------------------------------------------\nHelps converting unittest test-cases to pytest\n-----------------------------------------------------\n\n:Author: Hartmut Goebel \n:Version: 0.4\n:Copyright: 2015-2019 by Hartmut Goebel\n:Licence: GNU Public Licence v3 or later (GPLv3+)\n:Homepage: https://github.com/pytest-dev/unittest2pytest\n\n\n.. image:: https://secure.travis-ci.org/pytest-dev/unittest2pytest.png?branch=develop\n :target: https://travis-ci.org/pytest-dev/unittest2pytest/\n\n\n`unittest2pytest` is a tool that helps rewriting Python `unittest`\ntest-cases into pytest_ test-cases.\n\nIn contrast to other similar tools, this `unittest2pytest`\n\n* handles keyword arguments,\n* handles single-line test-cases and several tests on one line,\n* uses context-handlers where appropriate.\n\nThis is done by using ``lib2to3`` and Python's mighty ``inspect``\nmodule.\n\n\n\nInstallation\n===================\n\nTo install unittest2pytest, simply run::\n\n pip install unittest2pytest\n\n\nUsage\n===================\n\nTo print a diff of changes that unittest2pytest will make against a\nparticular source file or directory::\n\n unittest2pytest source_folder\n\nTo have those changes written to the files::\n\n unittest2pytest -w source_folder\n\nTo have those changes written to another directory::\n\n unittest2pytest -w source_folder --output-dir /some/where/else\n\nBy default, this will create backup files for each file that will be\nchanged. You can add the `-n` option to not create the backups. Please\ndo not do this if you are not using a version control system.\n\nFor more options about running particular fixers, run\n``unittest2pytest --help`` or read the `lib2to3 documentation`_. This\ntool is built on top of that one.\n\n\nFixes\n===================\n\nA list of the available fixers can be found with the following::\n\n $ unittest2pytest -l\n Available transformations for the -f/--fix option:\n remove_class\n self_assert\n\n\nNote: if your tests use the context managers ``with self.assertRaises`` or\n``with self.assertWarns``, they will be transformed to ``pytest.raises`` or\n``pytest.warns`` appropriately, but because the semantics are different, any\nuse of the output value from the context managers (e.g. the ``x`` in\n``with pytest.raises(ValueError) as x:``) will be wrong and will require\nmanual adjustment after the fact.\n\n.. _`lib2to3 documentation`: http://docs.python.org/library/2to3.html\n.. _pytest: https://pytest.org/latest/\n\n\n..\n Local Variables:\n mode: rst\n ispell-local-dictionary: \"american\"\n coding: utf-8\n End:\n\n\nChangelog\n============\n\n0.4 (2019-06-30)\n----------------\n\n* Add support for ``assertDictContainsSubset``.\n\n* Put parenthesis around expressions if required.\n\n* Fixed assertRaisesRegex, assertRaisesRegexp and assertWarnsRegex.\n The regex was getting replaced with an undefined variable `pattern`.\n\n* Fix assertRaisesRegex and assertRaisesRegexp with `**kwargs` and\n `atom` parameters.\n\n* Made assertRaisesRegex, assertRaisesRegexp and assertWarnsRegex use\n the `match` kwarg in `pytest.raises` instead of creating a variable\n with the context manager and doing an assert on `re.search`.\n\n\n* Add a short developer guide.\n\n* Remove testing on Python 3.0, 3.1, 3.2, add 3.6 and 3.7.\n\n* Distribute package as a universal wheel.\n\n\nv0.3 (2016-07-26)\n------------------\n\n* Add support for assertRaises / assertWarns context managers.\n\n* Add support for converting lambda arguments in assertRaises into\n context managers.\n\n* Fix some incorrect transformations.\n\n* Internal cleanup and fixes.\n\n\nv0.2 (2015-10-20)\n---------------------\n\n* Add support for assertRegex/assertRegexpMatches, assertNotRegex,\n assertRaisesRegex/assertRaisesRegexp, assertWarnsRegex.\n\n* `unittest2pytest` is now a `pytest` subproject.\n\n* Minor fixes.\n\n\nv0.1 (2015-10-16)\n---------------------\n\n* Initial release\n\n..\n Local Variables:\n mode: rst\n ispell-local-dictionary: \"american\"\n coding: utf-8\n End:\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pytest-dev/unittest2pytest", "keywords": "", "license": "GPLv3+", "maintainer": "", "maintainer_email": "", "name": "unittest2pytest", "package_url": "https://pypi.org/project/unittest2pytest/", "platform": "", "project_url": "https://pypi.org/project/unittest2pytest/", "project_urls": { "Homepage": "https://github.com/pytest-dev/unittest2pytest" }, "release_url": "https://pypi.org/project/unittest2pytest/0.4/", "requires_dist": null, "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "summary": "Convert unittest test-cases to pytest", "version": "0.4" }, "last_serial": 5505989, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "a145c60da441725f700a04d2ddfc50c3", "sha256": "92bd835b4ccb23a256004ce116e3a64820566a23d028812dd8bc375bbc0aab82" }, "downloads": -1, "filename": "unittest2pytest-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a145c60da441725f700a04d2ddfc50c3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12796, "upload_time": "2015-10-16T21:43:45", "url": "https://files.pythonhosted.org/packages/10/6e/763e316513f27652528faae04e4ec1e9cfc423bab48a8055124ebc6a738c/unittest2pytest-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eaa0f1c304661e603e080ff6345c1b99", "sha256": "2fd2fda60a885edee78bee476d5b5c1aa9a5d09b36ff1f3d759cd565d571dbe5" }, "downloads": -1, "filename": "unittest2pytest-0.1.tar.gz", "has_sig": false, "md5_digest": "eaa0f1c304661e603e080ff6345c1b99", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25798, "upload_time": "2015-10-16T21:43:50", "url": "https://files.pythonhosted.org/packages/71/45/09e6d2e18693d9b4ed05e0c30bcf4eb3ef42c492d6aa9802e251591015e0/unittest2pytest-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "7ede76b80d7d185ad8a7114c9fa9bf57", "sha256": "c3203431217eb8806b485b293de9fe21de40f4fa52c8314cd7f11151468f1652" }, "downloads": -1, "filename": "unittest2pytest-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7ede76b80d7d185ad8a7114c9fa9bf57", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13316, "upload_time": "2015-10-20T16:07:14", "url": "https://files.pythonhosted.org/packages/f1/ab/aa460ca1a8fe869a9a67358436b9e9397d48633ceaa9f406d2f0f3fee219/unittest2pytest-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7553fef6d3ad31954780468b014f617e", "sha256": "ba0f0d12b9f7078f95676e16d8efee75be84ed4032d2d33a2c2274232cc2543e" }, "downloads": -1, "filename": "unittest2pytest-0.2.tar.gz", "has_sig": false, "md5_digest": "7553fef6d3ad31954780468b014f617e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27266, "upload_time": "2015-10-20T16:07:19", "url": "https://files.pythonhosted.org/packages/30/fe/abf05f49016796586d47a721e468f71fb5f97ea648648c3d49fe723ef0a3/unittest2pytest-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "35cda4964e02270f513faa9d77b36383", "sha256": "8194beef58f906e312ef40401590ca0ca7b428e535a7d22855b9a64ba19a9eab" }, "downloads": -1, "filename": "unittest2pytest-0.3.tar.gz", "has_sig": false, "md5_digest": "35cda4964e02270f513faa9d77b36383", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30389, "upload_time": "2016-07-26T15:15:07", "url": "https://files.pythonhosted.org/packages/fe/95/a4b5d92da847425827eb5cd63cd1d8f51e85d1a0eae93c6414043ef7b162/unittest2pytest-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "2819e5f0788ae92dcbce62e1420c078d", "sha256": "8f270c37fee3b57b3e2bb32db0a872d07ddb77c3b2ae62e1c922b1b497af9a2f" }, "downloads": -1, "filename": "unittest2pytest-0.4-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "2819e5f0788ae92dcbce62e1420c078d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 15811, "upload_time": "2019-06-30T14:09:01", "url": "https://files.pythonhosted.org/packages/06/79/4ee8f18ce02c0910bde07c0651449da572a13e6c8a38b1e0a9fdfc66fab5/unittest2pytest-0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9bbf0f7d67541a6e1a7bbd7be2c8b0fa", "sha256": "a909522aa54787e20c1cabda9624bf81edcfe5107dc3c73a478ad2d0cf67c21f" }, "downloads": -1, "filename": "unittest2pytest-0.4.tar.gz", "has_sig": true, "md5_digest": "9bbf0f7d67541a6e1a7bbd7be2c8b0fa", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 35465, "upload_time": "2019-06-30T14:09:09", "url": "https://files.pythonhosted.org/packages/6f/04/e244aa1879fd96617fdf64526e7cc98531fbdf27762d44525cdabb5c2a8f/unittest2pytest-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2819e5f0788ae92dcbce62e1420c078d", "sha256": "8f270c37fee3b57b3e2bb32db0a872d07ddb77c3b2ae62e1c922b1b497af9a2f" }, "downloads": -1, "filename": "unittest2pytest-0.4-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "2819e5f0788ae92dcbce62e1420c078d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 15811, "upload_time": "2019-06-30T14:09:01", "url": "https://files.pythonhosted.org/packages/06/79/4ee8f18ce02c0910bde07c0651449da572a13e6c8a38b1e0a9fdfc66fab5/unittest2pytest-0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9bbf0f7d67541a6e1a7bbd7be2c8b0fa", "sha256": "a909522aa54787e20c1cabda9624bf81edcfe5107dc3c73a478ad2d0cf67c21f" }, "downloads": -1, "filename": "unittest2pytest-0.4.tar.gz", "has_sig": true, "md5_digest": "9bbf0f7d67541a6e1a7bbd7be2c8b0fa", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 35465, "upload_time": "2019-06-30T14:09:09", "url": "https://files.pythonhosted.org/packages/6f/04/e244aa1879fd96617fdf64526e7cc98531fbdf27762d44525cdabb5c2a8f/unittest2pytest-0.4.tar.gz" } ] }