]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.7] bpo-35233: Rewrite test_embed.InitConfigTests (GH-10524) (GH-10529)
authorVictor Stinner <vstinner@redhat.com>
Wed, 14 Nov 2018 01:01:52 +0000 (02:01 +0100)
committerGitHub <noreply@github.com>
Wed, 14 Nov 2018 01:01:52 +0000 (02:01 +0100)
commit35c28d562ec7249f2a6aef8e326eadac130a1656
tree3a6d8ab6b5348965a80653293b71a6acf4b0b160
parent52fb9f14b1b872f088e8110179aa7071fc06bbde
[3.7] bpo-35233: Rewrite test_embed.InitConfigTests (GH-10524) (GH-10529)

* Add C functions:

  * _Py_GetGlobalVariablesAsDict()
  * _PyCoreConfig_AsDict()
  * _PyMainInterpreterConfig_AsDict()

* Add new _testcapi methods:

  * get_global_config()
  * get_core_config()
  * get_main_config()

* test.pythoninfo: get global, core and main configuration
* _testembed now serializes global, core and main configurations
  using JSON to reuse _Py_GetGlobalVariablesAsDict(),
  _PyCoreConfig_AsDict() and _PyMainInterpreterConfig_AsDict(),
  rather than duplicating code.
* test_embed.InitConfigTests now test much more configuration
  variables
Include/pylifecycle.h
Lib/test/pythoninfo.py
Lib/test/test_embed.py
Modules/_testcapimodule.c
Modules/main.c
Programs/_testembed.c