Skip to content
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

[3.7] bpo-35233: InitConfigTests tests more config vars (GH-10541) #10546

Merged
merged 1 commit into from Nov 14, 2018
Merged

[3.7] bpo-35233: InitConfigTests tests more config vars (GH-10541) #10546

merged 1 commit into from Nov 14, 2018

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Nov 14, 2018

test_embed.InitConfigTests tests more configuration variables.

Changes:

  • InitConfigTests tests more core configuration variables:

    • base_exec_prefix
    • base_prefix
    • exec_prefix
    • home
    • module_search_path_env
    • prefix
  • "_testembed init_from_config" tests more variables:

    • argv
    • warnoptions
    • xoptions
  • Py_HasFileSystemDefaultEncoding value is no longer tested since it
    depends on the LC_CTYPE locale and the platform.

  • InitConfigTests: add check_global_config(), check_core_config() and
    check_main_config() subfunctions to cleanup the code. Move also
    constants at the class level (ex: COPY_MAIN_CONFIG).

  • Use more macros in _PyCoreConfig_AsDict() and
    _PyMainInterpreterConfig_AsDict() to reduce code duplication.

  • Other minor cleanups.

(cherry picked from commit 01de89c)

https://bugs.python.org/issue35233

test_embed.InitConfigTests tests more configuration variables.

Changes:

* InitConfigTests tests more core configuration variables:

  * base_exec_prefix
  * base_prefix
  * exec_prefix
  * home
  * module_search_path_env
  * prefix

* "_testembed init_from_config" tests more variables:

  * argv
  * warnoptions
  * xoptions

* Py_HasFileSystemDefaultEncoding value is no longer tested since it
  depends on the LC_CTYPE locale and the platform.
* InitConfigTests: add check_global_config(), check_core_config() and
  check_main_config() subfunctions to cleanup the code. Move also
  constants at the class level (ex: COPY_MAIN_CONFIG).
* Use more macros in _PyCoreConfig_AsDict() and
  _PyMainInterpreterConfig_AsDict() to reduce code duplication.
* Other minor cleanups.

(cherry picked from commit 01de89c)
@vstinner
Copy link
Member Author

This change should also fix test_embed on FreeBSD (on Python 3.7) -- cc @pablogsal

@vstinner vstinner merged commit 9ee1d42 into python:3.7 Nov 14, 2018
@vstinner vstinner deleted the init_config_tests37 branch November 14, 2018 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants