From: Hong Minhee Date: Sat, 30 Mar 2013 19:49:50 +0000 (+0900) Subject: Remove unused imports X-Git-Tag: rel_0_5_0~14^2^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bdcf9d5fe1bfd999020bd803c232a4bd154e550;p=thirdparty%2Fsqlalchemy%2Falembic.git Remove unused imports --- diff --git a/tests/__init__.py b/tests/__init__.py index d3480946..268ac610 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,10 +1,9 @@ from __future__ import with_statement -from sqlalchemy.engine import url, default +from sqlalchemy.engine import default import shutil import os -import itertools -from sqlalchemy import create_engine, text, MetaData +from sqlalchemy import create_engine, text from alembic import util from alembic.migration import MigrationContext from alembic.environment import EnvironmentContext @@ -12,14 +11,12 @@ import re import alembic from alembic.operations import Operations from alembic.script import ScriptDirectory, Script -from alembic import ddl import StringIO from alembic.ddl.impl import _impls import ConfigParser from nose import SkipTest from sqlalchemy.exc import SQLAlchemyError from sqlalchemy.util import decorator -import shutil import textwrap staging_directory = os.path.join(os.path.dirname(__file__), 'scratch') @@ -372,4 +369,4 @@ def downgrade(): op.execute("DROP STEP 3") """ % (c, b)) - return a, b, c \ No newline at end of file + return a, b, c diff --git a/tests/test_bulk_insert.py b/tests/test_bulk_insert.py index 128a67da..d6c37a32 100644 --- a/tests/test_bulk_insert.py +++ b/tests/test_bulk_insert.py @@ -1,7 +1,6 @@ -from tests import op_fixture, _sqlite_testing_config, eq_, assert_raises_message +from tests import op_fixture, eq_, assert_raises_message from alembic import op -from sqlalchemy import Integer, \ - UniqueConstraint, String +from sqlalchemy import Integer, String from sqlalchemy.sql import table, column from unittest import TestCase from sqlalchemy import Table, Column, MetaData diff --git a/tests/test_mssql.py b/tests/test_mssql.py index 4113e333..0948581a 100644 --- a/tests/test_mssql.py +++ b/tests/test_mssql.py @@ -4,9 +4,7 @@ from tests import op_fixture, capture_context_buffer, \ _no_sql_testing_config, assert_raises_message, staging_env, \ three_rev_fixture, clear_staging_env from alembic import op, command, util -from sqlalchemy import Integer, Column, ForeignKey, \ - UniqueConstraint, Table, MetaData, String -from sqlalchemy.sql import table +from sqlalchemy import Integer, Column from unittest import TestCase diff --git a/tests/test_mysql.py b/tests/test_mysql.py index 50483766..246181a8 100644 --- a/tests/test_mysql.py +++ b/tests/test_mysql.py @@ -1,8 +1,6 @@ from tests import op_fixture, assert_raises_message from alembic import op, util -from sqlalchemy import Integer, Column, ForeignKey, \ - UniqueConstraint, Table, MetaData, String,\ - func +from sqlalchemy import Integer, func def test_rename_column(): context = op_fixture('mysql') @@ -122,4 +120,4 @@ def test_drop_generic_constraint(): "No generic 'DROP CONSTRAINT' in MySQL - please " "specify constraint type", op.drop_constraint, "f1", "t1" - ) \ No newline at end of file + ) diff --git a/tests/test_offline_environment.py b/tests/test_offline_environment.py index 92d7a12e..c5e5c590 100644 --- a/tests/test_offline_environment.py +++ b/tests/test_offline_environment.py @@ -1,6 +1,6 @@ from tests import clear_staging_env, staging_env, \ - _no_sql_testing_config, sqlite_db, eq_, ne_, \ - capture_context_buffer, three_rev_fixture, env_file_fixture,\ + _no_sql_testing_config, \ + three_rev_fixture, env_file_fixture,\ assert_raises_message from alembic import command, util from unittest import TestCase diff --git a/tests/test_oracle.py b/tests/test_oracle.py index a14197d9..87a3e4fd 100644 --- a/tests/test_oracle.py +++ b/tests/test_oracle.py @@ -1,12 +1,10 @@ """Test op functions against ORACLE.""" from __future__ import with_statement from tests import op_fixture, capture_context_buffer, \ - _no_sql_testing_config, assert_raises_message, staging_env, \ + _no_sql_testing_config, staging_env, \ three_rev_fixture, clear_staging_env -from alembic import op, command, util -from sqlalchemy import Integer, Column, ForeignKey, \ - UniqueConstraint, Table, MetaData, String -from sqlalchemy.sql import table +from alembic import op, command +from sqlalchemy import Integer, Column from unittest import TestCase diff --git a/tests/test_postgresql.py b/tests/test_postgresql.py index 03656ead..3adaa2b7 100644 --- a/tests/test_postgresql.py +++ b/tests/test_postgresql.py @@ -1,5 +1,5 @@ from __future__ import with_statement -from tests import op_fixture, db_for_dialect, eq_, staging_env, \ +from tests import db_for_dialect, eq_, staging_env, \ clear_staging_env, _no_sql_testing_config,\ capture_context_buffer, requires_07, write_script from unittest import TestCase @@ -241,4 +241,4 @@ class PostgresqlDefaultCompareTest(TestCase): ) assert not self._compare_default( t1, t2, t2.c.id, "" - ) \ No newline at end of file + ) diff --git a/tests/test_revision_paths.py b/tests/test_revision_paths.py index cfb4affa..0861c8cb 100644 --- a/tests/test_revision_paths.py +++ b/tests/test_revision_paths.py @@ -1,4 +1,4 @@ -from tests import clear_staging_env, staging_env, eq_, ne_, \ +from tests import clear_staging_env, staging_env, eq_, \ assert_raises_message from alembic import util diff --git a/tests/test_sql_script.py b/tests/test_sql_script.py index 1d84cb7d..fd1fc7d8 100644 --- a/tests/test_sql_script.py +++ b/tests/test_sql_script.py @@ -1,9 +1,9 @@ from __future__ import with_statement from tests import clear_staging_env, staging_env, \ - _no_sql_testing_config, sqlite_db, eq_, ne_, capture_context_buffer, \ - three_rev_fixture, assert_raises_message -from alembic import command, util + _no_sql_testing_config, capture_context_buffer, \ + three_rev_fixture +from alembic import command cfg = None a, b, c = None, None, None diff --git a/tests/test_sqlite.py b/tests/test_sqlite.py index 8d514eeb..9ceb78e5 100644 --- a/tests/test_sqlite.py +++ b/tests/test_sqlite.py @@ -1,9 +1,7 @@ from tests import op_fixture, assert_raises_message -from alembic import op, util -from sqlalchemy import Integer, Column, ForeignKey, \ - UniqueConstraint, Table, MetaData, String,\ - func, Boolean -from sqlalchemy.sql import table, column +from alembic import op +from sqlalchemy import Integer, Column, Boolean +from sqlalchemy.sql import column def test_add_column(): context = op_fixture('sqlite') diff --git a/tests/test_versioning.py b/tests/test_versioning.py index 989d612b..fdf400f3 100644 --- a/tests/test_versioning.py +++ b/tests/test_versioning.py @@ -1,10 +1,9 @@ from __future__ import with_statement from tests import clear_staging_env, staging_env, \ - _sqlite_testing_config, sqlite_db, eq_, ne_, write_script, \ + _sqlite_testing_config, sqlite_db, eq_, write_script, \ assert_raises_message from alembic import command, util from alembic.script import ScriptDirectory -import time import unittest import os