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

Method test_initialize_pymain

Lib/test/test_embed.py:374–380  ·  view source on GitHub ↗

bpo-34008: Calling Py_Main() after Py_Initialize() must not fail.

(self)

Source from the content-addressed store, hash-verified

372 self.assertEqual(err, '')
373
374 def test_initialize_pymain(self):
375 """
376 bpo-34008: Calling Py_Main() after Py_Initialize() must not fail.
377 """
378 out, err = self.run_embedded_interpreter("test_initialize_pymain")
379 self.assertEqual(out.rstrip(), "Py_Main() after Py_Initialize: sys.argv=['-c', 'arg2']")
380 self.assertEqual(err, '')
381
382 def test_run_main(self):
383 out, err = self.run_embedded_interpreter("test_run_main")

Callers

nothing calls this directly

Calls 3

assertEqualMethod · 0.45
rstripMethod · 0.45

Tested by

no test coverage detected