c7da7f2d08
Repaired :meth:`.Operations.rename_table` for SQL Server when the target table is in a remote schema, the schema name is omitted from the "new name" argument. Also added some extra tests for sp_rename w/ quoting / case sensitive names. Change-Id: I411b32d0c5bba5a466c0b5d6a412c1b7541fdc95 Fixes: #429 |
||
---|---|---|
alembic | ||
docs/build | ||
tests | ||
.coveragerc | ||
.gitignore | ||
.gitreview | ||
CHANGES | ||
LICENSE | ||
MANIFEST.in | ||
README.rst | ||
README.unittests.rst | ||
reap_oracle_dbs.py | ||
run_tests.py | ||
setup.cfg | ||
setup.py | ||
tox.ini |
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".