8000 gh-99741: Clean Up the _xxsubinterpreters Module by ericsnowcurrently · Pull Request #99940 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-99741: Clean Up the _xxsubinterpreters Module #99940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
Next Next commit
Add a dedicated ChannelIDTests.test_shareable().
  • Loading branch information
ericsnowcurrently committed Dec 2, 2022
commit ad000ad19745a65fce05d642ec050de29b9bf1c0
13 changes: 12 additions & 1 deletion Lib/test/test__xxsubinterpreters.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,6 @@ def test_types(self):
self._assert_values([
b'spam',
9999,
self.cid,
])

def test_bytes(self):
Expand Down Expand Up @@ -1213,6 +1212,18 @@ def test_equality(self):
self.assertFalse(cid1 != cid2)
self.assertTrue(cid1 != cid3)

def test_shareable(self):
chan = interpreters.channel_create()

obj = interpreters.channel_create()
interpreters.channel_send(chan, obj)
got = interpreters.channel_recv(chan)

self.assertEqual(got, obj)
self.assertIs(type(got), type(obj))
# XXX Check the following in the channel tests?
#self.assertIsNot(got, obj)


class ChannelTests(TestBase):

Expand Down
0