diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-01-06 01:19:47 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-01-06 18:23:11 -0500 |
commit | 1e278de4cc9a4181e0747640a960e80efcea1ca9 (patch) | |
tree | 13d0c035807613bfa07e734acad79b9c843cb8b0 /lib/sqlalchemy/testing/replay_fixture.py | |
parent | 1e1a38e7801f410f244e4bbb44ec795ae152e04e (diff) | |
download | sqlalchemy-1e278de4cc9a4181e0747640a960e80efcea1ca9.tar.gz |
Post black reformatting
Applied on top of a pure run of black -l 79 in
I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9, this set of changes
resolves all remaining flake8 conditions for those codes
we have enabled in setup.cfg.
Included are resolutions for all remaining flake8 issues
including shadowed builtins, long lines, import order, unused
imports, duplicate imports, and docstring issues.
Change-Id: I4f72d3ba1380dd601610ff80b8fb06a2aff8b0fe
Diffstat (limited to 'lib/sqlalchemy/testing/replay_fixture.py')
-rw-r--r-- | lib/sqlalchemy/testing/replay_fixture.py | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/lib/sqlalchemy/testing/replay_fixture.py b/lib/sqlalchemy/testing/replay_fixture.py index 9832b07a2..613d7572b 100644 --- a/lib/sqlalchemy/testing/replay_fixture.py +++ b/lib/sqlalchemy/testing/replay_fixture.py @@ -1,13 +1,14 @@ -from . import fixtures -from . import profiling -from .. import util -import types from collections import deque import contextlib +import types + from . import config -from sqlalchemy import MetaData -from sqlalchemy import create_engine -from sqlalchemy.orm import Session +from . import fixtures +from . import profiling +from .. import create_engine +from .. import MetaData +from .. import util +from ..orm import Session class ReplayFixtureTest(fixtures.TestBase): @@ -19,7 +20,10 @@ class ReplayFixtureTest(fixtures.TestBase): dbapi_session = ReplayableSession() creator = config.db.pool._creator - recorder = lambda: dbapi_session.recorder(creator()) + + def recorder(): + return dbapi_session.recorder(creator()) + engine = create_engine( config.db.url, creator=recorder, use_native_hstore=False ) @@ -34,7 +38,9 @@ class ReplayFixtureTest(fixtures.TestBase): self.teardown_engine() engine.dispose() - player = lambda: dbapi_session.player() + def player(): + return dbapi_session.player() + engine = create_engine( config.db.url, creator=player, use_native_hstore=False ) |