Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Address review
  • Loading branch information
sobolevn committed Jul 6, 2025
commit 19daa81995ad29e1ec262349bdc5fb57e6d33fc3
13 changes: 6 additions & 7 deletions Lib/test/test_interpreters/test_channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,12 @@ def test_equality(self):
self.assertNotEqual(ch1, ch2)

def test_pickle(self):
recv, send = channels.create()
for ch in [recv, send]:
for protocol in range(pickle.HIGHEST_PROTOCOL + 1):
with self.subTest(ch=ch, protocol=protocol):
data = pickle.dumps(ch, protocol)
unpickled = pickle.loads(data)
self.assertEqual(unpickled, ch)
ch, _ = channels.create()
for protocol in range(pickle.HIGHEST_PROTOCOL + 1):
with self.subTest(protocol=protocol):
data = pickle.dumps(ch, protocol)
unpickled = pickle.loads(data)
self.assertEqual(unpickled, ch)


class TestSendChannelAttrs(TestBase):
Expand Down
Loading