Skip to content

Commit 795bdf9

Browse files
committed
Use dictionary comprehension in test
1 parent 43998a1 commit 795bdf9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/decoder_test.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,10 @@ def test_string(self):
139139
self.validate_type_decoding("string", self.strings)
140140

141141
def test_byte(self):
142-
# Python 2.6 doesn't support dictionary comprehension
143-
b = dict(
144-
(bytes([0xC0 ^ k[0]]) + k[1:], v.encode("utf-8"))
142+
b = {
143+
bytes([0xC0 ^ k[0]]) + k[1:]: v.encode("utf-8")
145144
for k, v in self.strings.items()
146-
)
145+
}
147146
self.validate_type_decoding("byte", b)
148147

149148
def test_uint16(self):

0 commit comments

Comments
 (0)