Skip to content

Commit 7444e07

Browse files
committed
Cleanup formatting, no functional changes
Cleanup the formatting, remove parens, extraneous spaces, etc.
1 parent fcc800f commit 7444e07

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

test/test_admin.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ def test_config_resource():
88
with pytest.raises(KeyError):
99
bad_resource = kafka.admin.ConfigResource('something', 'foo')
1010
good_resource = kafka.admin.ConfigResource('broker', 'bar')
11-
assert(good_resource.resource_type == kafka.admin.ConfigResourceType.BROKER)
12-
assert(good_resource.name == 'bar')
13-
assert(good_resource.configs is None)
14-
good_resource = kafka.admin.ConfigResource(kafka.admin.ConfigResourceType.TOPIC, 'baz', {'frob' : 'nob'})
15-
assert(good_resource.resource_type == kafka.admin.ConfigResourceType.TOPIC)
16-
assert(good_resource.name == 'baz')
17-
assert(good_resource.configs == {'frob' : 'nob'})
11+
assert good_resource.resource_type == kafka.admin.ConfigResourceType.BROKER
12+
assert good_resource.name == 'bar'
13+
assert good_resource.configs is None
14+
good_resource = kafka.admin.ConfigResource(kafka.admin.ConfigResourceType.TOPIC, 'baz', {'frob': 'nob'})
15+
assert good_resource.resource_type == kafka.admin.ConfigResourceType.TOPIC
16+
assert good_resource.name == 'baz'
17+
assert good_resource.configs == {'frob': 'nob'}
1818

1919

2020
def test_new_partitions():
2121
good_partitions = kafka.admin.NewPartitions(6)
22-
assert(good_partitions.total_count == 6)
23-
assert(good_partitions.new_assignments is None)
22+
assert good_partitions.total_count == 6
23+
assert good_partitions.new_assignments is None
2424
good_partitions = kafka.admin.NewPartitions(7, [[1, 2, 3]])
25-
assert(good_partitions.total_count == 7)
26-
assert(good_partitions.new_assignments == [[1, 2, 3]])
25+
assert good_partitions.total_count == 7
26+
assert good_partitions.new_assignments == [[1, 2, 3]]
2727

2828

2929
def test_new_topic():
@@ -32,16 +32,16 @@ def test_new_topic():
3232
with pytest.raises(IllegalArgumentError):
3333
bad_topic = kafka.admin.NewTopic('foo', 1, -1)
3434
with pytest.raises(IllegalArgumentError):
35-
bad_topic = kafka.admin.NewTopic('foo', 1, 1, {1 : [1, 1, 1]})
35+
bad_topic = kafka.admin.NewTopic('foo', 1, 1, {1: [1, 1, 1]})
3636
good_topic = kafka.admin.NewTopic('foo', 1, 2)
37-
assert(good_topic.name == 'foo')
38-
assert(good_topic.num_partitions == 1)
39-
assert(good_topic.replication_factor == 2)
40-
assert(good_topic.replica_assignments == {})
41-
assert(good_topic.topic_configs == {})
42-
good_topic = kafka.admin.NewTopic('bar', -1, -1, {1 : [1, 2, 3]}, {'key' : 'value'})
43-
assert(good_topic.name == 'bar')
44-
assert(good_topic.num_partitions == -1)
45-
assert(good_topic.replication_factor == -1)
46-
assert(good_topic.replica_assignments == {1: [1, 2, 3]})
47-
assert(good_topic.topic_configs == {'key' : 'value'})
37+
assert good_topic.name == 'foo'
38+
assert good_topic.num_partitions == 1
39+
assert good_topic.replication_factor == 2
40+
assert good_topic.replica_assignments == {}
41+
assert good_topic.topic_configs == {}
42+
good_topic = kafka.admin.NewTopic('bar', -1, -1, {1: [1, 2, 3]}, {'key': 'value'})
43+
assert good_topic.name == 'bar'
44+
assert good_topic.num_partitions == -1
45+
assert good_topic.replication_factor == -1
46+
assert good_topic.replica_assignments == {1: [1, 2, 3]}
47+
assert good_topic.topic_configs == {'key': 'value'}

0 commit comments

Comments
 (0)