Name | pytest-mysql JSON |
Version |
3.1.0
JSON |
| download |
home_page | None |
Summary | MySQL process and client fixtures for pytest |
upload_time | 2024-12-10 10:51:53 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. |
keywords |
tests
pytest
fixture
mysql
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
.. image:: https://raw.githubusercontent.com/ClearcodeHQ/pytest-mysql/master/logo.png
:width: 100px
:height: 100px
pytest-mysql
============
.. image:: https://img.shields.io/pypi/v/pytest-mysql.svg
:target: https://pypi.python.org/pypi/pytest-mysql/
:alt: Latest PyPI version
.. image:: https://img.shields.io/pypi/wheel/pytest-mysql.svg
:target: https://pypi.python.org/pypi/pytest-mysql/
:alt: Wheel Status
.. image:: https://img.shields.io/pypi/pyversions/pytest-mysql.svg
:target: https://pypi.python.org/pypi/pytest-mysql/
:alt: Supported Python Versions
.. image:: https://img.shields.io/pypi/l/pytest-mysql.svg
:target: https://pypi.python.org/pypi/pytest-mysql/
:alt: License
What is this?
=============
This is a pytest plugin, that enables you to test your code that relies on a running MySQL Database.
It allows you to specify fixtures for MySQL process and client.
.. warning::
Only MySQL 5.7.6 and up are supported. For older versions, please use pytest-mysql 2.0.3
Although Pull Request to add back support for older MySQL versions are welcome.
How to use
==========
Plugin contains two fixtures
* **mysql** - it's a client fixture that has functional scope. After each test drops test database from MySQL ensuring repeatability.
* **mysql_proc** - session scoped fixture, that starts MySQL instance at it's first use and stops at the end of the tests.
* **mysql_noproc** - session scoped fixtures, that allows to connect to already existing MySQL instance, and cleans the database at the end of the tests
Simply include one of these fixtures into your tests fixture list.
You can also create additional mysql client and process fixtures if you'd need to:
.. code-block:: python
from pytest_mysql import factories
from getpass import getuser
mysql_my_proc = factories.mysql_proc(
port=None, user=getuser())
mysql_my = factories.mysql('mysql_my_proc')
.. note::
Each MySQL process fixture can be configured in a different way than the others through the fixture factory arguments.
Configuration
=============
You can define your settings in three ways, it's fixture factory argument, command line option and pytest.ini configuration option.
You can pick which you prefer, but remember that these settings are handled in the following order:
* ``Fixture factory argument``
* ``Command line option``
* ``Configuration option in your pytest.ini file``
.. list-table:: Configuration options
:header-rows: 1
* - MySQL/MariaDB option
- Fixture factory argument
- Command line option
- pytest.ini option
- Noop process fixture
- Default
* - Path to executable
- mysqld_exec
- --mysql-mysqld
- mysql_mysqld
- -
- mysqld
* - Path to safe executable
- mysqld_safe
- --mysql-mysqld-safe
- mysql_mysqld_safe
- -
- mysqld_safe
* - Path to mysql_install_db for legacy installations
- install_db
- --mysql-install-db
- mysql_install_db
- -
- mysql_install_db
* - Path to Admin executable
- admin_executable
- --mysql-admin
- mysql_admin
- -
- mysqladmin
* - Database hostname
- host
- --mysql-host
- mysql_host
- yes
- localhost
* - Database port
- port
- --mysql-port
- mysql_port
- yes (3306)
- random
* - MySQL user to work with
- user
- --mysql-user
- mysql_user
- -
- root
* - User's password
- passwd
- --mysql-passwd
- mysql_passwd
- -
-
* - Test database name
- dbname
- --mysql-dbname
- mysql_dbname
- -
- test
* - Starting parameters
- params
- --mysql-params
- mysql_params
- -
-
* - Log directory location [DEPRECATED]
- logsdir
- --mysql-logsdir
- mysql_logsdir
- -
- $TMPDIR
Example usage:
* pass it as an argument in your own fixture
.. code-block:: python
mysql_proc = factories.mysql_proc(
port=8888)
* use ``--mysql-port`` command line option when you run your tests
.. code-block::
py.test tests --mysql-port=8888
* specify your port as ``mysql_port`` in your ``pytest.ini`` file.
To do so, put a line like the following under the ``[pytest]`` section of your ``pytest.ini``:
.. code-block:: ini
[pytest]
mysql_port = 8888
Examples
========
Populating database for tests
-----------------------------
With SQLAlchemy
+++++++++++++++
This example shows how to populate database and create an SQLAlchemy's ORM connection:
Sample below is simplified session fixture from
`pyramid_fullauth <https://github.com/fizyk/pyramid_fullauth/>`_ tests:
.. code-block:: python
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.pool import NullPool
from zope.sqlalchemy import register
@pytest.fixture
def db_session(mysql):
"""Session for SQLAlchemy."""
from pyramid_fullauth.models import Base # pylint:disable=import-outside-toplevel
# assumes setting, these can be obtained from pytest-mysql config or mysql_proc
connection = f'mysql+mysqldb://root:@127.0.0.1:3307/tests?charset=utf8'
engine = create_engine(connection, echo=False, poolclass=NullPool)
pyramid_basemodel.Session = scoped_session(sessionmaker(extension=ZopeTransactionExtension()))
pyramid_basemodel.bind_engine(
engine, pyramid_basemodel.Session, should_create=True, should_drop=True)
yield pyramid_basemodel.Session
transaction.commit()
Base.metadata.drop_all(engine)
@pytest.fixture
def user(db_session):
"""Test user fixture."""
from pyramid_fullauth.models import User
from tests.tools import DEFAULT_USER
new_user = User(**DEFAULT_USER)
db_session.add(new_user)
transaction.commit()
return new_user
def test_remove_last_admin(db_session, user):
"""
Sample test checks internal login, but shows usage in tests with SQLAlchemy
"""
user = db_session.merge(user)
user.is_admin = True
transaction.commit()
user = db_session.merge(user)
with pytest.raises(AttributeError):
user.is_admin = False
.. note::
See the original code at `pyramid_fullauth's conftest file <https://github.com/fizyk/pyramid_fullauth/blob/2950e7f4a397b313aaf306d6d1a763ab7d8abf2b/tests/conftest.py#L35>`_.
Depending on your needs, that in between code can fire alembic migrations in case of sqlalchemy stack or any other code
Connecting to MySQL/MariaDB (in a docker)
-----------------------------------------
To connect to a docker run MySQL and run test on it, use noproc fixtures.
.. code-block:: sh
docker run --name some-db -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -d mysql --expose 3306
.. code-block:: sh
docker run --name some-db -e MARIADB_ALLOW_EMPTY_PASSWORD=yes -d mariadb --expose 3306
This will start MySQL in a docker container, however using a MySQL installed locally is not much different.
In tests, make sure that all your tests are using **mysql_noproc** fixture like that:
.. code-block:: python
mysql_in_docker = factories.mysql_noproc()
mysql = factories.mysql("mysql_in_docker")
def test_mysql_docker(mysql):
"""Run test."""
cur = mysql.cursor()
cur.query("CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);")
mysql.commit()
cur.close()
And run tests:
.. code-block:: sh
pytest --mysql-host=127.0.0.1
Running on Docker/as root
=========================
Unfortunately, running MySQL as root (thus by default on docker) is not possible.
MySQL (and MariaDB as well) will not allow it.
.. code-block::
USER nobody
This line should switch your docker process to run on user nobody. See `this comment for example <https://github.com/ClearcodeHQ/pytest-mysql/issues/62#issuecomment-367975723>`_
Package resources
-----------------
* Bug tracker: https://github.com/ClearcodeHQ/pytest-mysql/issues
Release
=======
Install pipenv and --dev dependencies first, Then run:
.. code-block::
pipenv run tbump [NEW_VERSION]
Raw data
{
"_id": null,
"home_page": null,
"name": "pytest-mysql",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "tests, pytest, fixture, mysql",
"author": null,
"author_email": "Grzegorz \u015aliwi\u0144ski <fizyk+pypi@fizyk.dev>",
"download_url": "https://files.pythonhosted.org/packages/23/9e/fdce5258bcef3e1143de166bd1aed71c63a2ffaa1170b230e822b2a9c249/pytest_mysql-3.1.0.tar.gz",
"platform": null,
"description": ".. image:: https://raw.githubusercontent.com/ClearcodeHQ/pytest-mysql/master/logo.png\n :width: 100px\n :height: 100px\n \npytest-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\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.3\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* **mysql_noproc** - session scoped fixtures, that allows to connect to already existing MySQL instance, and cleans the database 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 from getpass import getuser\n\n mysql_my_proc = factories.mysql_proc(\n port=None, user=getuser())\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.. list-table:: Configuration options\n :header-rows: 1\n\n * - MySQL/MariaDB option\n - Fixture factory argument\n - Command line option\n - pytest.ini option\n - Noop process fixture\n - Default\n * - Path to executable\n - mysqld_exec\n - --mysql-mysqld\n - mysql_mysqld\n - -\n - mysqld\n * - Path to safe executable\n - mysqld_safe\n - --mysql-mysqld-safe\n - mysql_mysqld_safe\n - -\n - mysqld_safe\n * - Path to mysql_install_db for legacy installations\n - install_db\n - --mysql-install-db\n - mysql_install_db\n - -\n - mysql_install_db\n * - Path to Admin executable\n - admin_executable\n - --mysql-admin\n - mysql_admin\n - -\n - mysqladmin\n * - Database hostname\n - host\n - --mysql-host\n - mysql_host\n - yes\n - localhost\n * - Database port\n - port\n - --mysql-port\n - mysql_port\n - yes (3306)\n - random\n * - MySQL user to work with\n - user\n - --mysql-user\n - mysql_user\n - -\n - root\n * - User's password\n - passwd\n - --mysql-passwd\n - mysql_passwd\n - -\n -\n * - Test database name\n - dbname\n - --mysql-dbname\n - mysql_dbname\n - -\n - test\n * - Starting parameters\n - params\n - --mysql-params\n - mysql_params\n - -\n -\n * - Log directory location [DEPRECATED]\n - logsdir\n - --mysql-logsdir\n - mysql_logsdir\n - -\n - $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\nExamples\n========\n\nPopulating database for tests\n-----------------------------\n\nWith SQLAlchemy\n+++++++++++++++\n\nThis example shows how to populate database and create an SQLAlchemy's ORM connection:\n\nSample below is simplified session fixture from\n`pyramid_fullauth <https://github.com/fizyk/pyramid_fullauth/>`_ tests:\n\n.. code-block:: python\n\n from sqlalchemy import create_engine\n from sqlalchemy.orm import scoped_session, sessionmaker\n from sqlalchemy.pool import NullPool\n from zope.sqlalchemy import register\n\n\n @pytest.fixture\n def db_session(mysql):\n \"\"\"Session for SQLAlchemy.\"\"\"\n from pyramid_fullauth.models import Base # pylint:disable=import-outside-toplevel\n\n # assumes setting, these can be obtained from pytest-mysql config or mysql_proc\n connection = f'mysql+mysqldb://root:@127.0.0.1:3307/tests?charset=utf8'\n\n engine = create_engine(connection, echo=False, poolclass=NullPool)\n pyramid_basemodel.Session = scoped_session(sessionmaker(extension=ZopeTransactionExtension()))\n pyramid_basemodel.bind_engine(\n engine, pyramid_basemodel.Session, should_create=True, should_drop=True)\n\n yield pyramid_basemodel.Session\n\n transaction.commit()\n Base.metadata.drop_all(engine)\n\n\n @pytest.fixture\n def user(db_session):\n \"\"\"Test user fixture.\"\"\"\n from pyramid_fullauth.models import User\n from tests.tools import DEFAULT_USER\n\n new_user = User(**DEFAULT_USER)\n db_session.add(new_user)\n transaction.commit()\n return new_user\n\n\n def test_remove_last_admin(db_session, user):\n \"\"\"\n Sample test checks internal login, but shows usage in tests with SQLAlchemy\n \"\"\"\n user = db_session.merge(user)\n user.is_admin = True\n transaction.commit()\n user = db_session.merge(user)\n\n with pytest.raises(AttributeError):\n user.is_admin = False\n.. note::\n\n See the original code at `pyramid_fullauth's conftest file <https://github.com/fizyk/pyramid_fullauth/blob/2950e7f4a397b313aaf306d6d1a763ab7d8abf2b/tests/conftest.py#L35>`_.\n Depending on your needs, that in between code can fire alembic migrations in case of sqlalchemy stack or any other code\n\nConnecting to MySQL/MariaDB (in a docker)\n-----------------------------------------\n\nTo connect to a docker run MySQL and run test on it, use noproc fixtures.\n\n.. code-block:: sh\n\n docker run --name some-db -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -d mysql --expose 3306\n\n.. code-block:: sh\n\n docker run --name some-db -e MARIADB_ALLOW_EMPTY_PASSWORD=yes -d mariadb --expose 3306\n\nThis will start MySQL in a docker container, however using a MySQL installed locally is not much different.\n\nIn tests, make sure that all your tests are using **mysql_noproc** fixture like that:\n\n.. code-block:: python\n\n mysql_in_docker = factories.mysql_noproc()\n mysql = factories.mysql(\"mysql_in_docker\")\n\n\n def test_mysql_docker(mysql):\n \"\"\"Run test.\"\"\"\n cur = mysql.cursor()\n cur.query(\"CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);\")\n mysql.commit()\n cur.close()\n\nAnd run tests:\n\n.. code-block:: sh\n\n pytest --mysql-host=127.0.0.1\n\n\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 <https://github.com/ClearcodeHQ/pytest-mysql/issues/62#issuecomment-367975723>`_\n\nPackage resources\n-----------------\n\n* Bug tracker: https://github.com/ClearcodeHQ/pytest-mysql/issues\n\nRelease\n=======\n\nInstall pipenv and --dev dependencies first, Then run:\n\n.. code-block::\n\n pipenv run tbump [NEW_VERSION]\n",
"bugtrack_url": null,
"license": "GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, \"this License\" refers to version 3 of the GNU Lesser General Public License, and the \"GNU GPL\" refers to version 3 of the GNU General Public License. \"The Library\" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An \"Application\" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A \"Combined Work\" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the \"Linked Version\". The \"Minimal Corresponding Source\" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The \"Corresponding Application Code\" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License \"or any later version\" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.",
"summary": "MySQL process and client fixtures for pytest",
"version": "3.1.0",
"project_urls": {
"Bug Tracker": "https://github.com/ClearcodeHQ/pytest-mysql/issues",
"Changelog": "https://github.com/ClearcodeHQ/pytest-mysql/blob/v3.1.0/CHANGES.rst",
"Source": "https://github.com/ClearcodeHQ/pytest-mysql"
},
"split_keywords": [
"tests",
" pytest",
" fixture",
" mysql"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "95aa870d54693b652e93fd338e1f79ddac3642385d0b5b9129dffc61a175b328",
"md5": "511221d1af6497a1255fa7d52ae4d819",
"sha256": "26d70c1db401a24d302a8dd93ff6b92457e94cbef4fd7b2f86343d8205129a3b"
},
"downloads": -1,
"filename": "pytest_mysql-3.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "511221d1af6497a1255fa7d52ae4d819",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 34452,
"upload_time": "2024-12-10T10:51:50",
"upload_time_iso_8601": "2024-12-10T10:51:50.899551Z",
"url": "https://files.pythonhosted.org/packages/95/aa/870d54693b652e93fd338e1f79ddac3642385d0b5b9129dffc61a175b328/pytest_mysql-3.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "239efdce5258bcef3e1143de166bd1aed71c63a2ffaa1170b230e822b2a9c249",
"md5": "31e1289306e2c09803ccaa330de02164",
"sha256": "51f4d90f3cbc0e45d4bb04c24172c2fe97eae8623b86a18a014c976dfeb449d7"
},
"downloads": -1,
"filename": "pytest_mysql-3.1.0.tar.gz",
"has_sig": false,
"md5_digest": "31e1289306e2c09803ccaa330de02164",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 37784,
"upload_time": "2024-12-10T10:51:53",
"upload_time_iso_8601": "2024-12-10T10:51:53.431771Z",
"url": "https://files.pythonhosted.org/packages/23/9e/fdce5258bcef3e1143de166bd1aed71c63a2ffaa1170b230e822b2a9c249/pytest_mysql-3.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-10 10:51:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ClearcodeHQ",
"github_project": "pytest-mysql",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "pytest-mysql"
}