Commit 425717fe authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-36763: Fix encoding/locale tests in test_embed (GH-13443)

* Fix encoding and locale tests in test_embed.InitConfigTests.
* InitConfigTests now only computes EXPECTED_CONFIG once.
* Add tests for PYTHONWARNINGS and PYTHONPATH env vars
parent 9932fd91
This diff is collapsed.
......@@ -568,7 +568,7 @@ static int test_init_dont_parse_argv(void)
}
static void set_all_env_vars(void)
static void set_most_env_vars(void)
{
putenv("PYTHONHASHSEED=42");
putenv("PYTHONMALLOC=malloc");
......@@ -585,13 +585,15 @@ static void set_all_env_vars(void)
putenv("PYTHONNOUSERSITE=1");
putenv("PYTHONFAULTHANDLER=1");
putenv("PYTHONIOENCODING=iso8859-1:replace");
/* FIXME: test PYTHONWARNINGS */
/* FIXME: test PYTHONEXECUTABLE */
/* FIXME: test PYTHONHOME */
/* FIXME: test PYTHONDEBUG */
/* FIXME: test PYTHONDUMPREFS */
/* FIXME: test PYTHONCOERCECLOCALE */
/* FIXME: test PYTHONPATH */
}
static void set_all_env_vars(void)
{
set_most_env_vars();
putenv("PYTHONWARNINGS=EnvVar");
putenv("PYTHONPATH=/my/path");
}
......@@ -609,7 +611,6 @@ static int test_init_env(void)
static void set_all_env_vars_dev_mode(void)
{
set_all_env_vars();
putenv("PYTHONMALLOC=");
putenv("PYTHONFAULTHANDLER=");
putenv("PYTHONDEVMODE=1");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment