bpo-12383: Refactor subprocess test_empty_env (#1874)
authorGregory P. Smith <greg@krypto.org>
Tue, 30 May 2017 21:40:37 +0000 (14:40 -0700)
committerGitHub <noreply@github.com>
Tue, 30 May 2017 21:40:37 +0000 (14:40 -0700)
commitb351248c1fa74277b886b0c9a2e1c2f65fabe9ef
tree88dded11864a1c203d3b330358836869a44a6fcf
parent9c972b578002cc3bbbf2ebf2856c69de892bc9e2
bpo-12383: Refactor subprocess test_empty_env (#1874)

Bugfix: This test wasn't being run because it was skipping based on the
presence of Py_ENABLE_SHARED rather than its value.  It is always present
on POSIX systems but defaults to 0.

Refactoring: Move the environment variables that can be ignored into a
function.  Parse the list from the child process and filter out the ones
to exclude in the parent before checking that the rest is empty.

Feature: Adds always present environment variables to ignore when
running in a Gentoo sandbox so that the test can pass there.
Lib/test/test_subprocess.py