Automatic style fix

This commit is contained in:
robot-clickhouse 2023-07-19 08:47:53 +00:00
parent a86baab88b
commit 70543e8ef9

View File

@ -302,12 +302,21 @@ def test_alter_attach(started_cluster, attachable_part, engine):
) )
main_node.query(f"ALTER TABLE {database}.alter_attach_test ATTACH PART 'all_1_1_0'") main_node.query(f"ALTER TABLE {database}.alter_attach_test ATTACH PART 'all_1_1_0'")
# On the main node, data is attached # On the main node, data is attached
assert main_node.query(f"SELECT CounterID FROM {database}.alter_attach_test") == "123\n" assert (
main_node.query(f"SELECT CounterID FROM {database}.alter_attach_test")
== "123\n"
)
# On the other node, data is replicated only if using a Replicated table engine # On the other node, data is replicated only if using a Replicated table engine
if engine == "ReplicatedMergeTree": if engine == "ReplicatedMergeTree":
assert dummy_node.query(f"SELECT CounterID FROM {database}.alter_attach_test") == "123\n" assert (
dummy_node.query(f"SELECT CounterID FROM {database}.alter_attach_test")
== "123\n"
)
else: else:
assert dummy_node.query(f"SELECT CounterID FROM {database}.alter_attach_test") == "" assert (
dummy_node.query(f"SELECT CounterID FROM {database}.alter_attach_test")
== ""
)
main_node.query(f"DROP DATABASE {database} SYNC") main_node.query(f"DROP DATABASE {database} SYNC")
dummy_node.query(f"DROP DATABASE {database} SYNC") dummy_node.query(f"DROP DATABASE {database} SYNC")
@ -333,7 +342,9 @@ def test_alter_drop_part(started_cluster, engine):
assert main_node.query(f"SELECT CounterID FROM {database}.alter_drop_part") == "" assert main_node.query(f"SELECT CounterID FROM {database}.alter_drop_part") == ""
if engine == "ReplicatedMergeTree": if engine == "ReplicatedMergeTree":
# The DROP operation is still replicated at the table engine level # The DROP operation is still replicated at the table engine level
assert dummy_node.query(f"SELECT CounterID FROM {database}.alter_drop_part") == "" assert (
dummy_node.query(f"SELECT CounterID FROM {database}.alter_drop_part") == ""
)
else: else:
assert ( assert (
dummy_node.query(f"SELECT CounterID FROM {database}.alter_drop_part") dummy_node.query(f"SELECT CounterID FROM {database}.alter_drop_part")