aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-05-20 16:38:48 +0200
committerGitHub <noreply@github.com>2019-05-20 16:38:48 +0200
commit425717fee1c72df464c9f85b9a8d32b9197d1035 (patch)
treea4d86374eaedbeea9e06f2b53c357789794bdef4 /Programs
parentbpo-35721: Close socket pair if Popen in _UnixSubprocessTransport fails (GH-1... (diff)
downloadcpython-425717fee1c72df464c9f85b9a8d32b9197d1035.tar.gz
cpython-425717fee1c72df464c9f85b9a8d32b9197d1035.tar.bz2
cpython-425717fee1c72df464c9f85b9a8d32b9197d1035.zip
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')
-rw-r--r--Programs/_testembed.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/Programs/_testembed.c b/Programs/_testembed.c
index 3dabf66de15..bc549369393 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");