Skip to content

Commit 19daa81

Browse files
committed
Address review
1 parent b9f6ce6 commit 19daa81

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Lib/test/test_interpreters/test_channels.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,12 @@ def test_equality(self):
120120
self.assertNotEqual(ch1, ch2)
121121

122122
def test_pickle(self):
123-
recv, send = channels.create()
124-
for ch in [recv, send]:
125-
for protocol in range(pickle.HIGHEST_PROTOCOL + 1):
126-
with self.subTest(ch=ch, protocol=protocol):
127-
data = pickle.dumps(ch, protocol)
128-
unpickled = pickle.loads(data)
129-
self.assertEqual(unpickled, ch)
123+
ch, _ = channels.create()
124+
for protocol in range(pickle.HIGHEST_PROTOCOL + 1):
125+
with self.subTest(protocol=protocol):
126+
data = pickle.dumps(ch, protocol)
127+
unpickled = pickle.loads(data)
128+
self.assertEqual(unpickled, ch)
130129

131130

132131
class TestSendChannelAttrs(TestBase):

0 commit comments

Comments
 (0)