Skip to content

Commit b4bdd8e

Browse files
committed
PEP8 fixes
1 parent 08c2945 commit b4bdd8e

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

test/test_util.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import os
2-
import random
1+
# -*- coding: utf-8 -*-
32
import struct
43
import unittest2
54
import kafka.util
65
import kafka.common
76

7+
88
class UtilTest(unittest2.TestCase):
99
@unittest2.skip("Unwritten")
1010
def test_relative_unpack(self):
@@ -64,21 +64,20 @@ def test_read_short_string(self):
6464
self.assertEqual(kafka.util.read_short_string('\x00\x00', 0), ('', 2))
6565
self.assertEqual(kafka.util.read_short_string('\x00\x0bsome string', 0), ('some string', 13))
6666

67-
def test_read_int_string__insufficient_data(self):
67+
def test_read_int_string__insufficient_data2(self):
6868
with self.assertRaises(kafka.common.BufferUnderflowError):
6969
kafka.util.read_int_string('\x00\x021', 0)
7070

71-
def test_relative_unpack(self):
71+
def test_relative_unpack2(self):
7272
self.assertEqual(
7373
kafka.util.relative_unpack('>hh', '\x00\x01\x00\x00\x02', 0),
7474
((1, 0), 4)
7575
)
7676

77-
def test_relative_unpack(self):
77+
def test_relative_unpack3(self):
7878
with self.assertRaises(kafka.common.BufferUnderflowError):
7979
kafka.util.relative_unpack('>hh', '\x00', 0)
8080

81-
8281
def test_group_by_topic_and_partition(self):
8382
t = kafka.common.TopicAndPartition
8483

@@ -91,12 +90,12 @@ def test_group_by_topic_and_partition(self):
9190
]
9291

9392
self.assertEqual(kafka.util.group_by_topic_and_partition(l), {
94-
"a" : {
95-
1 : t("a", 1),
96-
2 : t("a", 2),
97-
3 : t("a", 3),
93+
"a": {
94+
1: t("a", 1),
95+
2: t("a", 2),
96+
3: t("a", 3),
9897
},
99-
"b" : {
100-
3 : t("b", 3),
98+
"b": {
99+
3: t("b", 3),
101100
}
102101
})

0 commit comments

Comments
 (0)