summaryrefslogtreecommitdiffstats
path: root/Programs/_testembed.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-05-20 14:38:48 (GMT)
committerGitHub <noreply@github.com>2019-05-20 14:38:48 (GMT)
commit425717fee1c72df464c9f85b9a8d32b9197d1035 (patch)
treea4d86374eaedbeea9e06f2b53c357789794bdef4 /Programs/_testembed.c
parent9932fd91e878b740704ff599522e945a4bbe2ae1 (diff)
downloadcpython-425717fee1c72df464c9f85b9a8d32b9197d1035.zip
cpython-425717fee1c72df464c9f85b9a8d32b9197d1035.tar.gz
cpython-425717fee1c72df464c9f85b9a8d32b9197d1035.tar.bz2
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
Diffstat (limited to 'Programs/_testembed.c')
-rw-r--r--Programs/_testembed.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/Programs/_testembed.c b/Programs/_testembed.c
index 3dabf66..bc54936 100644
--- a/Programs/_testembed.c
+++ b/Programs/_testembed.c
@@ -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");