summaryrefslogtreecommitdiff
path: root/test/aaa_profiling
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-06-30 18:35:12 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-06-30 18:35:12 -0400
commitb38a76cd1d47cd6b8f1abef30ad7c3aeaa27d537 (patch)
tree7af1dba9e242c77a248cb2194434aa9bf3ca49b7 /test/aaa_profiling
parent715d6cf3d10a71acd7726b7e00c3ff40b4559bc7 (diff)
downloadsqlalchemy-b38a76cd1d47cd6b8f1abef30ad7c3aeaa27d537.tar.gz
- replace most explicitly-named test objects called "Mock..." with
actual mock objects from the mock library. I'd like to use mock for new tests so we might as well use it in obvious places. - use unittest.mock in py3.3 - changelog - add a note to README.unittests - add tests_require in setup.py - have tests import from sqlalchemy.testing.mock - apply usage of mock to one of the event tests. we can be using this approach all over the place.
Diffstat (limited to 'test/aaa_profiling')
-rw-r--r--test/aaa_profiling/test_resultset.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/aaa_profiling/test_resultset.py b/test/aaa_profiling/test_resultset.py
index 27e60410d..bbd8c4dba 100644
--- a/test/aaa_profiling/test_resultset.py
+++ b/test/aaa_profiling/test_resultset.py
@@ -3,6 +3,9 @@ from sqlalchemy.testing import fixtures, AssertsExecutionResults, profiling
from sqlalchemy import testing
from sqlalchemy.testing import eq_
from sqlalchemy.util import u
+from sqlalchemy.engine.result import RowProxy
+import sys
+
NUM_FIELDS = 10
NUM_RECORDS = 1000
@@ -80,7 +83,6 @@ class RowProxyTest(fixtures.TestBase):
__requires__ = 'cpython',
def _rowproxy_fixture(self, keys, processors, row):
- from sqlalchemy.engine.result import RowProxy
class MockMeta(object):
def __init__(self):
pass
@@ -96,7 +98,6 @@ class RowProxyTest(fixtures.TestBase):
return RowProxy(metadata, row, processors, keymap)
def _test_getitem_value_refcounts(self, seq_factory):
- import sys
col1, col2 = object(), object()
def proc1(value):
return value