diff options
| author | Катаев Денис <bteamko@gmail.com> | 2017-03-17 14:19:21 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-03-17 14:19:21 -0400 |
| commit | 8f7cf2990f9010ea4924f2525318dff0ba1028d7 (patch) | |
| tree | 3e0e4b44d8c4d5c8ae8e63b9ff5842770ec23515 /lib/sqlalchemy/testing/suite | |
| parent | d96fc5d02a921820aa5973daf66445c880ca6cd4 (diff) | |
| download | sqlalchemy-8f7cf2990f9010ea4924f2525318dff0ba1028d7.tar.gz | |
New features from python 2.7
After bump minimum supported version to 2.7 (1da9d3752160430c91534a8868ceb8c5ad1451d4), we can use new syntax.
Change-Id: Ib064c75a00562e641d132f9c57e5e69744200e05
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/347
Diffstat (limited to 'lib/sqlalchemy/testing/suite')
| -rw-r--r-- | lib/sqlalchemy/testing/suite/test_reflection.py | 2 | ||||
| -rw-r--r-- | lib/sqlalchemy/testing/suite/test_types.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/testing/suite/test_reflection.py b/lib/sqlalchemy/testing/suite/test_reflection.py index a761c0882..f47b34bf4 100644 --- a/lib/sqlalchemy/testing/suite/test_reflection.py +++ b/lib/sqlalchemy/testing/suite/test_reflection.py @@ -746,7 +746,7 @@ class ComponentReflectionTest(fixtures.TablesTest): ('dingalings', 'dingaling_id'), ]: cols = insp.get_columns(tname) - id_ = dict((c['name'], c) for c in cols)[cname] + id_ = {c['name']: c for c in cols}[cname] assert id_.get('autoincrement', True) diff --git a/lib/sqlalchemy/testing/suite/test_types.py b/lib/sqlalchemy/testing/suite/test_types.py index dbbe03111..ee757e1ca 100644 --- a/lib/sqlalchemy/testing/suite/test_types.py +++ b/lib/sqlalchemy/testing/suite/test_types.py @@ -340,7 +340,7 @@ class NumericTest(_LiteralRoundTripFixture, fixtures.TestBase): t.create() t.insert().execute([{'x': x} for x in input_]) - result = set([row[0] for row in t.select().execute()]) + result = {row[0] for row in t.select().execute()} output = set(output) if filter_: result = set(filter_(x) for x in result) |
