https://github.com/jsok/nose-alembic-attrib
Nose plugin allowing you to annotate tests with minimum revision numbers from alembic
https://github.com/jsok/nose-alembic-attrib
Last synced: 11 months ago
JSON representation
Nose plugin allowing you to annotate tests with minimum revision numbers from alembic
- Host: GitHub
- URL: https://github.com/jsok/nose-alembic-attrib
- Owner: jsok
- Created: 2013-04-10T10:28:33.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2015-08-08T00:06:10.000Z (almost 11 years ago)
- Last Synced: 2025-07-03T02:06:13.628Z (12 months ago)
- Language: Python
- Size: 145 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
===========
Nose plugin: Alembic Attrib
===========
.. image:: https://badge.fury.io/py/nose-alembic-attrib.svg
:target: http://badge.fury.io/py/nose-alembic-attrib
Requirements
-------------
* nose
* alembic
* sqlalchemy
Install
-------
Install with pip::
pip install nose-alembic-attrib
Quickstart
----------
Simply import the decorator and use as such::
from nose_alembic_attrib import alembic_attr
@alembic_attr(minimum_revision="4b9a79b051c6")
def test_my_alembic_test(self):
...
@alembic_attr(minimum_revision="5aa2dfb6e6a8")
def test_my_alembic_test(self):
...
Assuming your alembic revision history looks like this::
$> alembic history
5aa2dfb6e6a8 -> 3830063c1b00 (head), my head revision
4b9a79b051c6 -> 5aa2dfb6e6a8, my second revision
None -> 4b9a79b051c6, my first revision
Running nosetest as follows will honour those minimum revision anotations::
nosetest --with-alembicattrib --alembic-ini=alembic.ini
Options
-------
Options available:
* ``--with-alembicattrib``: Enable the plugin
* ``--alembic-ini=path/to/alembic.ini``: Assumed to be ``alembic.ini`` in the current dir by default
* ``--alembic-echo={True,False}``: Turn sqlalchemy engine echo on or off