Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c74f757

Browse files
fetzermsamotl
authored andcommitted
Columnstore: Revert (auto) reformatting
1 parent 6990dc4 commit c74f757

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/crate/client/sqlalchemy/tests/create_table_test.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
# software solely pursuant to the terms of the relevant commercial agreement.
2121

2222
import sqlalchemy as sa
23-
2423
try:
2524
from sqlalchemy.orm import declarative_base
2625
except ImportError:
@@ -32,6 +31,7 @@
3231
from unittest import TestCase
3332
from unittest.mock import patch, MagicMock
3433

34+
3535
fake_cursor = MagicMock(name='fake_cursor')
3636
FakeCursor = MagicMock(name='FakeCursor', spec=Cursor)
3737
FakeCursor.return_value = fake_cursor
@@ -77,7 +77,6 @@ class DummyTable(self.Base):
7777
__tablename__ = 'dummy'
7878
pk = sa.Column(sa.String, primary_key=True)
7979
obj_col = sa.Column(Object)
80-
8180
self.Base.metadata.create_all(bind=self.engine)
8281
fake_cursor.execute.assert_called_with(
8382
('\nCREATE TABLE dummy (\n\tpk STRING NOT NULL, \n\tobj_col OBJECT, '
@@ -92,7 +91,6 @@ class DummyTable(self.Base):
9291
}
9392
pk = sa.Column(sa.String, primary_key=True)
9493
p = sa.Column(sa.String)
95-
9694
self.Base.metadata.create_all(bind=self.engine)
9795
fake_cursor.execute.assert_called_with(
9896
('\nCREATE TABLE t (\n\t'
@@ -107,7 +105,6 @@ class DummyTable(self.Base):
107105
__tablename__ = 't'
108106
ts = sa.Column(sa.BigInteger, primary_key=True)
109107
p = sa.Column(sa.BigInteger, sa.Computed("date_trunc('day', ts)"))
110-
111108
self.Base.metadata.create_all(bind=self.engine)
112109
fake_cursor.execute.assert_called_with(
113110
('\nCREATE TABLE t (\n\t'
@@ -122,7 +119,6 @@ class DummyTable(self.Base):
122119
__tablename__ = 't'
123120
ts = sa.Column(sa.BigInteger, primary_key=True)
124121
p = sa.Column(sa.BigInteger, sa.Computed("date_trunc('day', ts)", persisted=False))
125-
126122
with self.assertRaises(sa.exc.CompileError):
127123
self.Base.metadata.create_all(bind=self.engine)
128124

@@ -135,7 +131,6 @@ class DummyTable(self.Base):
135131
}
136132
pk = sa.Column(sa.String, primary_key=True)
137133
p = sa.Column(sa.String)
138-
139134
self.Base.metadata.create_all(bind=self.engine)
140135
fake_cursor.execute.assert_called_with(
141136
('\nCREATE TABLE t (\n\t'
@@ -171,7 +166,6 @@ class DummyTable(self.Base):
171166
}
172167
pk = sa.Column(sa.String, primary_key=True)
173168
p = sa.Column(sa.String, primary_key=True)
174-
175169
self.Base.metadata.create_all(bind=self.engine)
176170
fake_cursor.execute.assert_called_with(
177171
('\nCREATE TABLE t (\n\t'
@@ -213,7 +207,6 @@ def test_column_pk_nullable(self):
213207
class DummyTable(self.Base):
214208
__tablename__ = 't'
215209
pk = sa.Column(sa.String, primary_key=True, nullable=True)
216-
217210
with self.assertRaises(sa.exc.CompileError):
218211
self.Base.metadata.create_all(bind=self.engine)
219212

@@ -237,7 +230,6 @@ class DummyTable(self.Base):
237230
__tablename__ = 't'
238231
pk = sa.Column(sa.String, primary_key=True)
239232
a = sa.Column(Geopoint, crate_index=False)
240-
241233
with self.assertRaises(sa.exc.CompileError):
242234
self.Base.metadata.create_all(bind=self.engine)
243235

0 commit comments

Comments
 (0)