MCPcopy Index your code
hub / github.com/python/cpython / test_ids_global

Method test_ids_global

Lib/test/test__interpchannels.py:417–434  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

415 self.assertEqual(len(after), len(before))
416
417 def test_ids_global(self):
418 id1 = _interpreters.create()
419 out = _run_output(id1, dedent("""
420 import _interpchannels as _channels
421 cid = _channels.create(3)
422 print(cid)
423 """))
424 cid1 = int(out.strip())
425
426 id2 = _interpreters.create()
427 out = _run_output(id2, dedent("""
428 import _interpchannels as _channels
429 cid = _channels.create(3)
430 print(cid)
431 """))
432 cid2 = int(out.strip())
433
434 self.assertEqual(cid2, int(cid1) + 1)
435
436 def test_channel_list_interpreters_none(self):
437 """Test listing interpreters for a channel with no associations."""

Callers

nothing calls this directly

Calls 5

_run_outputFunction · 0.90
dedentFunction · 0.90
createMethod · 0.45
stripMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected