diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-01-06 01:14:26 -0500 |
---|---|---|
committer | mike bayer <mike_mp@zzzcomputing.com> | 2019-01-06 17:34:50 +0000 |
commit | 1e1a38e7801f410f244e4bbb44ec795ae152e04e (patch) | |
tree | 28e725c5c8188bd0cfd133d1e268dbca9b524978 /test/sql/test_tablesample.py | |
parent | 404e69426b05a82d905cbb3ad33adafccddb00dd (diff) | |
download | sqlalchemy-1e1a38e7801f410f244e4bbb44ec795ae152e04e.tar.gz |
Run black -l 79 against all source files
This is a straight reformat run using black as is, with no edits
applied at all.
The black run will format code consistently, however in
some cases that are prevalent in SQLAlchemy code it produces
too-long lines. The too-long lines will be resolved in the
following commit that will resolve all remaining flake8 issues
including shadowed builtins, long lines, import order, unused
imports, duplicate imports, and docstring issues.
Change-Id: I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9
Diffstat (limited to 'test/sql/test_tablesample.py')
-rw-r--r-- | test/sql/test_tablesample.py | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/test/sql/test_tablesample.py b/test/sql/test_tablesample.py index 879e83182..712450d9f 100644 --- a/test/sql/test_tablesample.py +++ b/test/sql/test_tablesample.py @@ -16,10 +16,13 @@ class TableSampleTest(fixtures.TablesTest, AssertsCompiledSQL): @classmethod def define_tables(cls, metadata): - Table('people', metadata, - Column('people_id', Integer, primary_key=True), - Column('age', Integer), - Column('name', String(30))) + Table( + "people", + metadata, + Column("people_id", Integer, primary_key=True), + Column("age", Integer), + Column("name", String(30)), + ) def test_standalone(self): table1 = self.tables.people @@ -27,27 +30,28 @@ class TableSampleTest(fixtures.TablesTest, AssertsCompiledSQL): # no special alias handling even though clause is not in the # context of a FROM clause self.assert_compile( - tablesample(table1, 1, name='alias'), - 'people AS alias TABLESAMPLE system(:system_1)' + tablesample(table1, 1, name="alias"), + "people AS alias TABLESAMPLE system(:system_1)", ) self.assert_compile( - table1.tablesample(1, name='alias'), - 'people AS alias TABLESAMPLE system(:system_1)' + table1.tablesample(1, name="alias"), + "people AS alias TABLESAMPLE system(:system_1)", ) self.assert_compile( - tablesample(table1, func.bernoulli(1), name='alias', - seed=func.random()), - 'people AS alias TABLESAMPLE bernoulli(:bernoulli_1) ' - 'REPEATABLE (random())' + tablesample( + table1, func.bernoulli(1), name="alias", seed=func.random() + ), + "people AS alias TABLESAMPLE bernoulli(:bernoulli_1) " + "REPEATABLE (random())", ) def test_select_from(self): table1 = self.tables.people self.assert_compile( - select([table1.tablesample(text('1'), name='alias').c.people_id]), - 'SELECT alias.people_id FROM ' - 'people AS alias TABLESAMPLE system(1)' + select([table1.tablesample(text("1"), name="alias").c.people_id]), + "SELECT alias.people_id FROM " + "people AS alias TABLESAMPLE system(1)", ) |