{ "info": { "author": "Clearcode - The A Room", "author_email": "thearoom@clearcode.cc", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "pytest-mysql\n============\n\n.. image:: https://img.shields.io/pypi/v/pytest-mysql.svg\n :target: https://pypi.python.org/pypi/pytest-mysql/\n :alt: Latest PyPI version\n\n.. image:: https://img.shields.io/pypi/wheel/pytest-mysql.svg\n :target: https://pypi.python.org/pypi/pytest-mysql/\n :alt: Wheel Status\n\n.. image:: https://img.shields.io/pypi/pyversions/pytest-mysql.svg\n :target: https://pypi.python.org/pypi/pytest-mysql/\n :alt: Supported Python Versions\n\n.. image:: https://img.shields.io/pypi/l/pytest-mysql.svg\n :target: https://pypi.python.org/pypi/pytest-mysql/\n :alt: License\n\nPackage status\n--------------\n\n.. image:: https://travis-ci.org/ClearcodeHQ/pytest-mysql.svg?branch=v2.0.1\n :target: https://travis-ci.org/ClearcodeHQ/pytest-mysql\n :alt: Tests\n\n.. image:: https://coveralls.io/repos/ClearcodeHQ/pytest-mysql/badge.png?branch=v2.0.1\n :target: https://coveralls.io/r/ClearcodeHQ/pytest-mysql?branch=v2.0.1\n :alt: Coverage Status\n\n.. image:: https://requires.io/github/ClearcodeHQ/pytest-mysql/requirements.svg?tag=v2.0.1\n :target: https://requires.io/github/ClearcodeHQ/pytest-mysql/requirements/?tag=v2.0.1\n :alt: Requirements Status\n\nWhat is this?\n=============\n\nThis is a pytest plugin, that enables you to test your code that relies on a running MySQL Database.\nIt allows you to specify fixtures for MySQL process and client.\n\n.. warning::\n\n Only MySQL 5.7.6 and up are supported. For older versions, please use pytest-mysql 2.0.1\n Although Pull Request to add back support for older MySQL versions are welcome.\n\nHow to use\n==========\n\nPlugin contains two fixtures\n\n* **mysql** - it's a client fixture that has functional scope. After each test drops test database from MySQL ensuring repeatability.\n* **mysql_proc** - session scoped fixture, that starts MySQL instance at it's first use and stops at the end of the tests.\n\nSimply include one of these fixtures into your tests fixture list.\n\nYou can also create additional mysql client and process fixtures if you'd need to:\n\n\n.. code-block:: python\n\n from pytest_mysql import factories\n\n mysql_my_proc = factories.mysql_proc(\n port=None, logsdir='/tmp')\n mysql_my = factories.mysql('mysql_my_proc')\n\n.. note::\n\n Each MySQL process fixture can be configured in a different way than the others through the fixture factory arguments.\n\nConfiguration\n=============\n\nYou can define your settings in three ways, it's fixture factory argument, command line option and pytest.ini configuration option.\nYou can pick which you prefer, but remember that these settings are handled in the following order:\n\n * ``Fixture factory argument``\n * ``Command line option``\n * ``Configuration option in your pytest.ini file``\n\n+--------------------------+--------------------------+---------------------+-------------------+---------------------------+\n| MySQL option | Fixture factory argument | Command line option | pytest.ini option | Default |\n+==========================+==========================+=====================+===================+===========================+\n| Path to executable | mysqld_exec | --mysql-mysqld | mysql_mysqld | mysqld |\n+--------------------------+--------------------------+---------------------+-------------------+---------------------------+\n| Path to safe executable | mysqld_safe | --mysql-mysqld-safe | mysql_mysqld_safe | /usr/bin/mysqld_safe |\n+--------------------------+--------------------------+---------------------+-------------------+---------------------------+\n| Path to mysql_install_db | install_db | --mysql-install-db | mysql_install_db | /usr/bin/mysql_install_db |\n| for legacy installations | | | | |\n+--------------------------+--------------------------+---------------------+-------------------+---------------------------+\n| Path to Admin executable | admin_executable | --mysql-admin | mysql_admin | /usr/bin/mysqladmin |\n+--------------------------+--------------------------+---------------------+-------------------+---------------------------+\n| host | host | --mysql-host | mysql_host | localhost |\n+--------------------------+--------------------------+---------------------+-------------------+---------------------------+\n| port | port | --mysql-port | mysql_port | random |\n+--------------------------+--------------------------+---------------------+-------------------+---------------------------+\n| MySQL user to work with | user | --mysql-user | mysql_user | root |\n+--------------------------+--------------------------+---------------------+-------------------+---------------------------+\n| User's password | passwd | --mysql-passwd | mysql_passwd | |\n+--------------------------+--------------------------+---------------------+-------------------+---------------------------+\n| Test database name | dbname | --mysql-dbname | mysqldbname | test |\n+--------------------------+--------------------------+---------------------+-------------------+---------------------------+\n| Starting parameters | params | --mysql-params | mysql_params | |\n+--------------------------+--------------------------+---------------------+-------------------+---------------------------+\n| Log directory location | logsdir | --mysql-logsdir | mysql_logsdir | $TMPDIR |\n+--------------------------+--------------------------+---------------------+-------------------+---------------------------+\n\nExample usage:\n\n* pass it as an argument in your own fixture\n\n .. code-block:: python\n\n mysql_proc = factories.mysql_proc(\n port=8888)\n\n* use ``--mysql-port`` command line option when you run your tests\n\n .. code-block::\n\n py.test tests --mysql-port=8888\n\n\n* specify your port as ``mysql_port`` in your ``pytest.ini`` file.\n\n To do so, put a line like the following under the ``[pytest]`` section of your ``pytest.ini``:\n\n .. code-block:: ini\n\n [pytest]\n mysql_port = 8888\n\nRunning on Docker/as root\n=========================\n\nUnfortunately, running MySQL as root (thus by default on docker) is not possible.\nMySQL (and MariaDB as well) will not allow it.\n\n.. code-block::\n\n USER nobody\n\nThis line should switch your docker process to run on user nobody. See `this comment for example `_\n\nPackage resources\n-----------------\n\n* Bug tracker: https://github.com/ClearcodeHQ/pytest-mysql/issues\n\n\nCHANGELOG\n=========\n\n2.0.1\n-------\n\n- [fix] Improved mysql version detection on osx\n- [build] extracted xdist into separate stage on travis\n- [build] have deployemt as separate stage on travis\n\n2.0.0\n-------\n\n- [Enhancements] Add support for MySQL 5.7.6 and up with new configuration options. Legacy configuration supports older MySQL and MariaDB databases.\n- [breaking] mysql_exec ini option replaced with mysql_mysqld_safe\n- [breaking] --mysql-exec cmd option replaced with --mysql-mysqld-safe\n- [breaking] replaced mysql_init ini option with mysql_install_db\n- [breaking] replaced --mysql-init cmd option with --mysql-install-db \n- [breaking] added mysql_mysqld option and --mysql-mysqld cmd option\n\n1.1.1\n-------\n\n- [enhancements] removed path.py dependency\n\n1.1.0\n-------\n\n- [enhancement] change deprecated getfuncargvalaue to getfixturevalues, require at least pytest 3.0.0\n\n1.0.0\n-------\n\n- [enhancements] create command line and pytest.ini configuration options for mysql's log directory location\n- [enhancements] create command line and pytest.ini configuration options for mysql's starting parametetrs\n- [enhancements] create command line and pytest.ini configuration options for mysql test database name\n- [enhancements] create command line and pytest.ini configuration options for mysql's user password\n- [enhancements] create command line and pytest.ini configuration options for mysql user\n- [enhancements] create command line and pytest.ini configuration options for mysql host\n- [enhancements] create command line and pytest.ini configuration options for mysql port\n- [enhancements] create command line and pytest.ini configuration options for mysql's init executable\n- [enhancements] create command line and pytest.ini configuration options for mysql's admin executable\n- [enhancements] create command line and pytest.ini configuration options for mysql executable\n- [enhancements] create command line and pytest.ini configuration options for mysql logsdir\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/ClearcodeHQ/pytest-mysql", "keywords": "tests py.test pytest fixture mysql", "license": "LGPLv3", "maintainer": "", "maintainer_email": "", "name": "pytest-mysql", "package_url": "https://pypi.org/project/pytest-mysql/", "platform": "", "project_url": "https://pypi.org/project/pytest-mysql/", "project_urls": { "Homepage": "https://github.com/ClearcodeHQ/pytest-mysql" }, "release_url": "https://pypi.org/project/pytest-mysql/2.0.1/", "requires_dist": [ "pytest (>=3.0.0)", "mirakuru", "port-for", "mysqlclient", "pytest-cov (==2.6.0); extra == 'tests'", "pytest-xdist (==1.23.2); extra == 'tests'", "Mock (==2.0.0); extra == 'tests'" ], "requires_python": "", "summary": "MySQL process and client fixtures for pytest", "version": "2.0.1" }, "last_serial": 4320635, "releases": { "0.0.0": [], "1.0.0": [ { "comment_text": "", "digests": { "md5": "6974b06b6400c17021d47c40eb48f899", "sha256": "00d781a3acfdf971ed3e3c1e3b4e36c3b3ac66f2cea08fc1b9fc181c543b6c1e" }, "downloads": -1, "filename": "pytest_mysql-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6974b06b6400c17021d47c40eb48f899", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13513, "upload_time": "2016-11-11T23:14:21", "url": "https://files.pythonhosted.org/packages/7e/ef/7ecfc2a65e2f9798d3bf3938483c9a8fea3901bedaf3d22e7d44bef5ed8e/pytest_mysql-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0ce45d8dc242c677b7d4388619e699ac", "sha256": "504b4ee023cee5921291db531246a6db231a8401e649bd1cf6755e5a34cda3a8" }, "downloads": -1, "filename": "pytest-mysql-1.0.0.tar.gz", "has_sig": false, "md5_digest": "0ce45d8dc242c677b7d4388619e699ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9993, "upload_time": "2016-11-11T23:14:23", "url": "https://files.pythonhosted.org/packages/87/ff/47ec9b31e2644182e0973606f0f209cde9d54aae4f9c6d664ceac681a626/pytest-mysql-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "799f75cfbdd56835b985884f25a412bb", "sha256": "fbd1115f14579cdaa5a857f328068a004a790ea4099989238b2c8ff34c5ae752" }, "downloads": -1, "filename": "pytest_mysql-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "799f75cfbdd56835b985884f25a412bb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13641, "upload_time": "2016-11-15T22:08:07", "url": "https://files.pythonhosted.org/packages/d0/89/9d5274f9b61b10eea05cba848e1c3edd91e806a5fa7441e4eaa3a7ee8930/pytest_mysql-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "31f797edac64d1db3bc34248a36d5be9", "sha256": "a560b305049e096d4de390fa1ae76e165283f6ae27710b033339780764887f90" }, "downloads": -1, "filename": "pytest-mysql-1.1.0.tar.gz", "has_sig": false, "md5_digest": "31f797edac64d1db3bc34248a36d5be9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10061, "upload_time": "2016-11-15T22:08:09", "url": "https://files.pythonhosted.org/packages/75/8d/7bf23ed129e8351f2c238afd7a25205665c43270103ef1e671d89c91e46a/pytest-mysql-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "544630ca8f34db5d3e917dd370415cc4", "sha256": "6c69d2b84243b6c66612e427946667f84e35d440702b47483d037f40b1f24a60" }, "downloads": -1, "filename": "pytest_mysql-1.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "544630ca8f34db5d3e917dd370415cc4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13705, "upload_time": "2017-05-05T21:08:46", "url": "https://files.pythonhosted.org/packages/9b/e2/d81f7222952377d724342defa7824a1c3b057ad0ec46364225587985adb5/pytest_mysql-1.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2cebe10d257a18cc87d0e8091b2ccacc", "sha256": "834aea9299d27bf126c775593d82dc8e60d2c5318e43e81ace1bf0ee329d0f14" }, "downloads": -1, "filename": "pytest-mysql-1.1.1.tar.gz", "has_sig": false, "md5_digest": "2cebe10d257a18cc87d0e8091b2ccacc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10191, "upload_time": "2017-05-05T21:08:48", "url": "https://files.pythonhosted.org/packages/5a/09/2048cf5a56294a321115f4bed429a9733c7fe132fa92d4e3934c5d6ef9a8/pytest-mysql-1.1.1.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "c75195aa40c5b77f4bd2064add653a07", "sha256": "2782cf68479843b1d3975366516403897455d005aaf87a50083badd5b8498cf7" }, "downloads": -1, "filename": "pytest_mysql-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c75195aa40c5b77f4bd2064add653a07", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12806, "upload_time": "2018-06-30T10:55:07", "url": "https://files.pythonhosted.org/packages/81/58/5928a1ad95bb4e844d4155f1451a63592825f29df2f08bf8834ed7e925d1/pytest_mysql-2.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "81edfef2cb2bf9f7acea5d95571c9c43", "sha256": "6f8e9b103b017ff955d90ca182d6d68d1a69b53528c1c17cf418255168953077" }, "downloads": -1, "filename": "pytest-mysql-2.0.0.tar.gz", "has_sig": false, "md5_digest": "81edfef2cb2bf9f7acea5d95571c9c43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13118, "upload_time": "2018-06-30T10:55:08", "url": "https://files.pythonhosted.org/packages/c7/c5/e622ecc6c5f25516018124964bcf9c9a9cc55e6582990cbaa22fce479370/pytest-mysql-2.0.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "3f620b51d814a87f0f68d06033b62a28", "sha256": "0f1b97bc66cc0889b09b080b7894a4880add20bd5c2443c636ede2fe003d0217" }, "downloads": -1, "filename": "pytest_mysql-2.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3f620b51d814a87f0f68d06033b62a28", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12985, "upload_time": "2018-09-28T16:15:03", "url": "https://files.pythonhosted.org/packages/dc/9b/92a3dacfa46365e3133654538b7c674db595c48bbb19570b01a43320ce54/pytest_mysql-2.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1d901bd43840d0b21129bd0bea702400", "sha256": "5f6c63b3dc7de40fdc8f52691172807ae978519f32825b642ddd3b9c39bcff3d" }, "downloads": -1, "filename": "pytest-mysql-2.0.1.tar.gz", "has_sig": false, "md5_digest": "1d901bd43840d0b21129bd0bea702400", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13369, "upload_time": "2018-09-28T16:15:05", "url": "https://files.pythonhosted.org/packages/bf/0b/163deb397846433e3e662e4fd0dca89e666c80e0b8abd01a6d18aedb0e52/pytest-mysql-2.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3f620b51d814a87f0f68d06033b62a28", "sha256": "0f1b97bc66cc0889b09b080b7894a4880add20bd5c2443c636ede2fe003d0217" }, "downloads": -1, "filename": "pytest_mysql-2.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3f620b51d814a87f0f68d06033b62a28", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12985, "upload_time": "2018-09-28T16:15:03", "url": "https://files.pythonhosted.org/packages/dc/9b/92a3dacfa46365e3133654538b7c674db595c48bbb19570b01a43320ce54/pytest_mysql-2.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1d901bd43840d0b21129bd0bea702400", "sha256": "5f6c63b3dc7de40fdc8f52691172807ae978519f32825b642ddd3b9c39bcff3d" }, "downloads": -1, "filename": "pytest-mysql-2.0.1.tar.gz", "has_sig": false, "md5_digest": "1d901bd43840d0b21129bd0bea702400", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13369, "upload_time": "2018-09-28T16:15:05", "url": "https://files.pythonhosted.org/packages/bf/0b/163deb397846433e3e662e4fd0dca89e666c80e0b8abd01a6d18aedb0e52/pytest-mysql-2.0.1.tar.gz" } ] }