mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-33932: Calling Py_Initialize() twice does nothing (GH-7845)
Calling Py_Initialize() twice does nothing, instead of failing with a fatal error: restore the Python 3.6 behaviour.
This commit is contained in:
parent
bcd3a1a18d
commit
209abf7469
4 changed files with 30 additions and 0 deletions
|
@ -229,6 +229,15 @@ class EmbeddingTests(unittest.TestCase):
|
|||
self.assertEqual(out, '')
|
||||
self.assertEqual(err, '')
|
||||
|
||||
def test_initialize_twice(self):
|
||||
"""
|
||||
bpo-33932: Calling Py_Initialize() twice should do nothing (and not
|
||||
crash!).
|
||||
"""
|
||||
out, err = self.run_embedded_interpreter("initialize_twice")
|
||||
self.assertEqual(out, '')
|
||||
self.assertEqual(err, '')
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue