{ "info": { "author": "Dan Gass", "author_email": "dan.gass@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "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", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Text Processing" ], "description": "###############################\n[baseline] Easy String Baseline\n###############################\n\n.. image:: https://readthedocs.org/projects/baseline/badge/?version=latest\n :target: https://baseline.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://travis-ci.org/dmgass/baseline.svg?branch=master\n :target: https://travis-ci.org/dmgass/baseline\n\nThis tool streamlines creation and maintenance of tests which compare string\noutput against a baseline. It offers a mechanism to compare a string against\na baselined copy and update the baselined copy to match the new value when a\nmismatch occurs. The update process includes a manual step to facilitate a\nreview of the change before acceptance. The tool uses multi-line string format\nfor string baselines to improve readability for human review.\n\n\n***********\nQuick Start\n***********\n\nCreate an empty baseline with a triple quoted multi-line string. Place\nthe ending triple quote on a separate line and indent it to the level\nyou wish the string baseline update to be indented to. Add a compare of\nthe string being tested to the baseline string. Then save the file as\n``fox.py``:\n\n.. code-block:: python\n\n from baseline import Baseline\n\n expected = Baseline(\"\"\"\n \"\"\")\n\n test_string = \"THE QUICK BROWN FOX\\n JUMPS\\nOVER THE LAZY DOG.\"\n\n assert test_string == expected\n\n\nRun ``fox.py`` and observe that the ``assert`` raises an exception since\nthe strings are not equal. Because the comparison failed, the tool located\nthe triple quoted baseline string in the source file and updated it with the\nmiscompared value. When the interpretter exited, the tool saved the updated\nsource file but changed the file name to ``fox.update.py``:\n\n.. code-block:: python\n\n from baseline import Baseline\n\n expected = Baseline(\"\"\"\n THE QUICK BROWN FOX\n JUMPS\n OVER THE LAZY DOG.\n \"\"\")\n\n test_string = \"THE QUICK BROWN FOX\\n JUMPS\\nOVER THE LAZY DOG.\"\n\n assert test_string == expected\n\n\nAfter reviewing the change with your favorite file differencing tool,\naccept the change by either manually overwriting the original file or use\nthe ``baseline`` command line tool to scan the directory for updated\nscripts and accept them:\n\n.. code-block:: shell\n\n $ python -m baseline *\n Found updates for:\n fox.py\n\n Hit [ENTER] to update, [Ctrl-C] to cancel\n\n fox.update.py -> fox.py\n\n\nRun ``fox.py`` again and observe the ``assert`` does not raise an exception\nnor is a source file update generated. If in the future the test value\nchanges, the ``assert`` will raise an exception and cause a new source file\nupdate to be generated. Simply repeat the review and acceptance step and you\nare back in business!\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/dmgass/baseline", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dmgass/baseline", "keywords": "compare baseline string test", "license": "MIT License ; http://opensource.org/licenses/MIT", "maintainer": "Dan Gass", "maintainer_email": "dan.gass@gmail.com", "name": "baseline", "package_url": "https://pypi.org/project/baseline/", "platform": "any", "project_url": "https://pypi.org/project/baseline/", "project_urls": { "Download": "https://github.com/dmgass/baseline", "Homepage": "https://github.com/dmgass/baseline" }, "release_url": "https://pypi.org/project/baseline/0.2.1/", "requires_dist": [ "setuptools (>=39.0.1)", "enum34 (>=1.1.6); python_version < \"3.0\"", "Sphinx (>=1.6.7); extra == 'doc'", "sphinx-rtd-theme; extra == 'doc'", "sphinxcontrib-programoutput; extra == 'doc'", "nose; extra == 'test'", "unittest2; python_version < \"3.0\" and extra == 'test'", "mock (>=2.0.0); python_version < \"3.0\" and extra == 'test'" ], "requires_python": ">=2.7.0,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "summary": "Easy string baseline.", "version": "0.2.1" }, "last_serial": 3878139, "releases": { "0.1.0b1": [ { "comment_text": "", "digests": { "md5": "92052e40e57f069ca10d251c666c8c05", "sha256": "4af3991d48e42c64213c189205d6890f5b567394c498c9f8de648d11752fcc73" }, "downloads": -1, "filename": "baseline-0.1.0b1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "92052e40e57f069ca10d251c666c8c05", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7.0,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 15653, "upload_time": "2018-03-26T02:13:59", "url": "https://files.pythonhosted.org/packages/c8/c2/74ee7f8d41feb4887c2d4ddfc65c0755a37232ad0f1f54a70ae9969401fd/baseline-0.1.0b1-py2.py3-none-any.whl" } ], "0.1.1b1": [ { "comment_text": "", "digests": { "md5": "6cbe0937667595070dc88392c62da064", "sha256": "b86d8c91422bdb1616609a5eba4d576dc7c291e883c956a07cd0ffd7c6d370a1" }, "downloads": -1, "filename": "baseline-0.1.1b1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6cbe0937667595070dc88392c62da064", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7.0,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 15630, "upload_time": "2018-03-26T02:21:11", "url": "https://files.pythonhosted.org/packages/fa/b4/680212bd469bb141236e05344e5cca04ec3f7759e91aa825915ecfc112e8/baseline-0.1.1b1-py2.py3-none-any.whl" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "56f2fa536787dc9f262b1d92d6e45eae", "sha256": "aa1f247f055b59874070830f178dfad4b4a932697d00e3f17d4512021ab0e9f0" }, "downloads": -1, "filename": "baseline-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "56f2fa536787dc9f262b1d92d6e45eae", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7.0,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 15830, "upload_time": "2018-03-28T02:52:39", "url": "https://files.pythonhosted.org/packages/09/d8/dd68b867f57ed2b6855e171bf2ed2ec9ccf49d211184b4c4f6adf071f16a/baseline-0.1.2-py2.py3-none-any.whl" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "82296d4b806bdb1fb958f921035c7f70", "sha256": "b4aa85e92a2db297687f1b7c710f769cca9714c68ded3f87c90ad671690610ec" }, "downloads": -1, "filename": "baseline-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "82296d4b806bdb1fb958f921035c7f70", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7.0,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 15849, "upload_time": "2018-03-30T02:33:59", "url": "https://files.pythonhosted.org/packages/4a/2a/dd3ba17a5dcb3895bb2c94a0d5fbcd5ec5ac8cc9b4a38af074a5e5f2d773/baseline-0.1.3-py2.py3-none-any.whl" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "1212f81bffefb28592e6b156d881bc2f", "sha256": "10254f2d648590b0364d25172d0692e2122ffb89c4e2f651be71cda8c32b8ea3" }, "downloads": -1, "filename": "baseline-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1212f81bffefb28592e6b156d881bc2f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7.0,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 15854, "upload_time": "2018-04-02T05:08:28", "url": "https://files.pythonhosted.org/packages/2e/ee/6b13d2aaa7513cbb4cdbf564fe607e08a56987f44bd18aa4ce1a2da02192/baseline-0.1.4-py2.py3-none-any.whl" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "e4641a793cf836c9d46f2ada0313e0ae", "sha256": "582097aa926b7c4bafd7d87a4ec44db682d6b1656363655209759e82bb7b894c" }, "downloads": -1, "filename": "baseline-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e4641a793cf836c9d46f2ada0313e0ae", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7.0,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 15994, "upload_time": "2018-05-18T13:06:56", "url": "https://files.pythonhosted.org/packages/57/fa/cec5e5b1785ff9b6836b6e8ef4671b34088ae902e7fe914907f6ecc30205/baseline-0.2.0-py2.py3-none-any.whl" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "0d63067b339ff1d1e072bbd01edf0b85", "sha256": "5036e7d4af38f77cadd17436ccd19a89b748dafc95ab4c63d55654c26f88f109" }, "downloads": -1, "filename": "baseline-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0d63067b339ff1d1e072bbd01edf0b85", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7.0,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 16000, "upload_time": "2018-05-19T03:30:47", "url": "https://files.pythonhosted.org/packages/dd/b2/82aab3b17008bbfca2f757c06010066b59567e6e90dffe7dbbd355027c55/baseline-0.2.1-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0d63067b339ff1d1e072bbd01edf0b85", "sha256": "5036e7d4af38f77cadd17436ccd19a89b748dafc95ab4c63d55654c26f88f109" }, "downloads": -1, "filename": "baseline-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0d63067b339ff1d1e072bbd01edf0b85", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7.0,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", "size": 16000, "upload_time": "2018-05-19T03:30:47", "url": "https://files.pythonhosted.org/packages/dd/b2/82aab3b17008bbfca2f757c06010066b59567e6e90dffe7dbbd355027c55/baseline-0.2.1-py2.py3-none-any.whl" } ] }