From: Mike Bayer Date: Mon, 17 Mar 2014 01:54:23 +0000 (-0400) Subject: - use compat version of mock for py3 X-Git-Tag: rel_0_6_4~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1328b5e4dc70924d54a7f4c5201a840224252b47;p=thirdparty%2Fsqlalchemy%2Falembic.git - use compat version of mock for py3 --- diff --git a/tests/__init__.py b/tests/__init__.py index 9bb5ef6b..cd721ae4 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -29,9 +29,11 @@ testing_config.read(['test.cfg']) if py33: from unittest.mock import Mock, call + from unittest import mock else: try: from mock import Mock, call + import mock except ImportError: raise ImportError( "Alembic's test suite requires the " diff --git a/tests/test_op.py b/tests/test_op.py index 1b82af30..277f1845 100644 --- a/tests/test_op.py +++ b/tests/test_op.py @@ -7,7 +7,7 @@ from sqlalchemy import event from alembic import op from . import op_fixture, assert_raises_message, requires_094, eq_ -import mock +from . import mock @event.listens_for(Table, "after_parent_attach") def _add_cols(table, metadata):