-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from jeancochrane/rename-plugin
Rename the plugin to 'pytest-flask-sqlalchemy'
- Loading branch information
Showing
9 changed files
with
41 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.egg-info | ||
__pycache__ | ||
.pytest_cache | ||
.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# pytest-flask-sqlalchemy-transactions | ||
# pytest-flask-sqlalchemy | ||
|
||
[![Build Status](https://travis-ci.org/jeancochrane/pytest-flask-sqlalchemy-transactions.svg?branch=master)](https://travis-ci.org/jeancochrane/pytest-flask-sqlalchemy-transactions) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/Django.svg) | ||
[![Build Status](https://travis-ci.org/jeancochrane/pytest-flask-sqlalchemy.svg?branch=master)](https://travis-ci.org/jeancochrane/pytest-flask-sqlalchemy) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/Django.svg) | ||
|
||
A [pytest](https://docs.pytest.org/en/latest/) plugin providing fixtures for running tests in | ||
transactions using [Flask-SQLAlchemy](http://flask-sqlalchemy.pocoo.org/latest/). | ||
|
@@ -13,6 +13,7 @@ transactions using [Flask-SQLAlchemy](http://flask-sqlalchemy.pocoo.org/latest/) | |
- [Installation](#installation) | ||
- [From PyPi](#from-pypi) | ||
- [Development version](#development-version) | ||
- [Supported backends](#supported-backends) | ||
- [Configuration](#configuration) | ||
- [Conftest setup](#conftest-setup) | ||
- [Test configuration](#test-configuration) | ||
|
@@ -125,7 +126,7 @@ def test_transaction_doesnt_persist(db_session): | |
Install using pip: | ||
|
||
``` | ||
pip install pytest-flask-sqlalchemy-transactions | ||
pip install pytest-flask-sqlalchemy | ||
``` | ||
|
||
Once installed, pytest will detect the plugin automatically during test collection. | ||
|
@@ -137,8 +138,8 @@ documentation](https://docs.pytest.org/en/latest/plugins.html?highlight=plugins) | |
Clone the repo from GitHub and switch into the new directory: | ||
|
||
``` | ||
git clone [email protected]:jeancochrane/pytest-flask-sqlalchemy-transactions.git | ||
cd pytest-flask-sqlalchemy-transactions | ||
git clone [email protected]:jeancochrane/pytest-flask-sqlalchemy.git | ||
cd pytest-flask-sqlalchemy | ||
``` | ||
|
||
You can install using pip: | ||
|
@@ -147,6 +148,20 @@ You can install using pip: | |
pip install . | ||
``` | ||
|
||
### <a name="supported-backends">Supported backends</a> | ||
|
||
So far, pytest-flask-sqlalchemy has been most extensively tested against | ||
PostgreSQL 9.6. It should theoretically work with any backend that is supported | ||
by SQLAlchemy, but Postgres is the only backend that is currently tested by the | ||
test suite. | ||
|
||
Official support for SQLite and MySQL is [planned for a future | ||
release](https://github.com/jeancochrane/pytest-flask-sqlalchemy/issues/3). | ||
In the meantime, if you're using one of those backends and you run in to | ||
problems, we would greatly appreciate your help! [Open an | ||
issue](https://github.com/jeancochrane/pytest-flask-sqlalchemy/issues/new) if | ||
something isn't working as you expect. | ||
|
||
## <a name="configuration"></a>Configuration | ||
|
||
### <a name="conftest-setup"></a>Conftest setup | ||
|
@@ -448,6 +463,10 @@ whose blog post ["Delightful testing with pytest and | |
Flask-SQLAlchemy"](http://alexmic.net/flask-sqlalchemy-pytest/) helped | ||
establish the basic approach on which this plugin builds. | ||
|
||
Many thanks to [Igor Ghisi](https://github.com/igortg/), who donated the PyPi | ||
package name. Igor had been working on a similar plugin and proposed combining | ||
efforts. Thanks to Igor, the plugin name is much stronger. | ||
|
||
## <a name="copyright"></a>Copyright | ||
|
||
Copyright (c) 2018 Jean Cochrane and DataMade. Released under the MIT License. | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
''' | ||
pytest-flask-sqlalchemy-transactions | ||
==================================== | ||
Run tests in transactions using pytest, Flask, and SQLAlchemy. | ||
''' | ||
from setuptools import setup | ||
|
||
|
||
|
@@ -12,16 +6,16 @@ def readme(): | |
return f.read() | ||
|
||
setup( | ||
name='pytest-flask-sqlalchemy-transactions', | ||
name='pytest-flask-sqlalchemy', | ||
author='Jean Cochrane', | ||
author_email='[email protected]', | ||
url='https://github.com/jeancochrane/pytest-flask-sqlalchemy-transactions', | ||
description='Run tests in transactions using pytest, Flask, and SQLalchemy.', | ||
url='https://github.com/jeancochrane/pytest-flask-sqlalchemy', | ||
description='A pytest plugin for preserving test isolation in Flask-SQlAlchemy using database transactions.', | ||
long_description=readme(), | ||
long_description_content_type='text/markdown', | ||
license='MIT', | ||
version='1.0.1', | ||
packages=['transactions'], | ||
version='1.0.0', | ||
packages=['pytest_flask_sqlalchemy'], | ||
install_requires=['pytest>=3.2.1', | ||
'pytest-mock>=1.6.2', | ||
'SQLAlchemy>=1.2.2', | ||
|
@@ -42,7 +36,7 @@ def readme(): | |
# Make the package available to pytest | ||
entry_points={ | ||
'pytest11': [ | ||
'pytest-flask-sqlalchemy-transactions = transactions.plugin', | ||
'pytest-flask-sqlalchemy = pytest_flask_sqlalchemy.plugin', | ||
] | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters