RETIRED, further work has moved to Debian project infrastructure
Go to file
Mike Bayer 0955d44f4b - move resolution of "starting rev" for --sql mode into
get_current_heads() directly; therefore we don't need to
do this in alembic.command, which we were doing for stamp but
not downgrade/upgrade.  The slight change here is that the
context.get_starting_revision_argument() method will
return an abbreviated starting rev as abbreviated in
all cases, including the stamp command, where we previously
were converting a stamp argument first, but not for the
upgrade or downgrade commands.
- Fixed bug where using a partial revision identifier as the
"starting revision" in ``--sql`` mode in a downgrade operation
would fail to resolve properly.  fixes #269
2015-02-03 11:51:13 -05:00
alembic - move resolution of "starting rev" for --sql mode into 2015-02-03 11:51:13 -05:00
docs/build - move resolution of "starting rev" for --sql mode into 2015-02-03 11:51:13 -05:00
tests - move resolution of "starting rev" for --sql mode into 2015-02-03 11:51:13 -05:00
.coveragerc - coverage was not working (and needs to be fixed in SQLAlchemy too), 2014-09-14 15:51:19 -04:00
.gitignore - move towards sqlalchemy test base. autogenerate tests so far 2014-09-13 15:38:53 -04:00
CHANGES move the changelog to the new changelog extension 2012-10-20 21:13:47 -04:00
LICENSE - happy new year 2015-01-12 14:15:35 -05:00
MANIFEST.in fix manifest 2014-11-24 15:20:59 -05:00
README.rst - modernize the readme especially the SQLite thing 2014-11-21 16:18:39 -05:00
README.unittests.rst - test runner updates 2014-11-24 15:16:38 -05:00
run_tests.py - coverage was not working (and needs to be fixed in SQLAlchemy too), 2014-09-14 15:51:19 -04:00
setup.cfg - move pretty much all of sqlalchemy.testing over for now, as we'd 2014-09-14 11:37:50 -04:00
setup.py fixes for the nose runner 2014-09-14 11:51:04 -04:00
tox.ini - coverage was not working (and needs to be fixed in SQLAlchemy too), 2014-09-14 15:51:19 -04:00

README.unittests.rst

Running Unit Tests

Tests can be run be run using via py.test, via the nose front-end script, or the Python setup.py script:

py.test

python run_tests.py

python setup.py test

There's also a tox.ini file with several configurations:

tox

Setting up Optional Databases

The test suite will attempt to run a subset of tests against various database backends, including Postgresql and MySQL. It uses the database URLs in the [db] section of setup.cfg to locate a URL for particular backend types. If the URL cannot be loaded, either because the requisite DBAPI is not present, or if the target database is found to be not accessible, the test is skipped.

To run tests for these backends, replace URLs with working ones inside the setup.cfg file. Setting a URL here requires that the corresponding DBAPI is installed as well as that the target database is running. A connection to the database should provide access to a blank schema, where tables will be created and dropped. It is critical that this schema have no tables in it already.

For Postgresql, it is also necessary that the target database contain a user-accessible schema called "test_schema".