# Buggy code
def _getenvdata(self, reader, config):
    from_option = self.config.option.env
    from_environ = os.environ.get("TOXENV")
    from_config = reader.getstring("envlist", replace=False)

    env_list = []
    envlist_explicit = False
    if (from_option and "ALL" in from_option) or (
        not from_option and from_environ and "ALL" in from_environ.split(",")
    ):
        all_envs = self._getallenvs(reader)
    else:
        candidates = (
            (os.environ.get(PARALLEL_ENV_VAR_KEY), True),
            (from_option, True),
            (from_environ, True),
            ("py" if self.config.option.devenv is not None else None, False),
            (from_config, False),
        )
        env_str, envlist_explicit = next(
            ((i, e) for i, e in candidates if i), ([], False)
        )
        env_list = _split_env(env_str)
        all_envs = self._getallenvs(reader, env_list)

    if not env_list:
        env_list = all_envs

    package_env = config.isolated_build_env
    if config.isolated_build is True and package_env in all_envs:
        all_envs.remove(package_env)

    if config.isolated_build is True and package_env in env_list:
        msg = "isolated_build_env {} cannot be part of envlist".format(package_env)
        raise tox.exception.ConfigError(msg)
    return env_list, all_envs, _split_env(from_config), envlist_explicit


# Traceback (AssertionError)
$ tox -p all
⠸ [3] py36 | py37 | py38ERROR: invocation failed (exit code 1), logfile: /home/churchyard/tmp/totox/.tox/py37/log/py37-5.log
=================================================== log start ===================================================
py37 run-test-pre: PYTHONHASHSEED='1114882869'
py37 run-test: commands[0] | python runner.py
py37 run-test-pre: PYTHONHASHSEED='3136963143'
py37 run-test: commands[0] | python -c 'import sys; print(sys.version)'
3.7.5 (default, Oct 17 2019, 12:09:47)
[GCC 9.2.1 20190827 (Red Hat 9.2.1-1)]
Traceback (most recent call last):
File "runner.py", line 8, in <module>
assert 'py36' in cp.stdout
AssertionError
ERROR: InvocationError for command /home/churchyard/tmp/totox/.tox/py37/bin/python runner.py (exited with code 1)

==================================================== log end ====================================================
✖ FAIL py37 in 1.389 seconds
⠴ [2] py36 | py38ERROR: invocation failed (exit code 1), logfile: /home/churchyard/tmp/totox/.tox/py38/log/py38-5.log
=================================================== log start ===================================================
py38 run-test-pre: PYTHONHASHSEED='3502501543'
py38 run-test: commands[0] | python runner.py
py38 run-test-pre: PYTHONHASHSEED='1953872060'
py38 run-test: commands[0] | python -c 'import sys; print(sys.version)'
3.8.0 (default, Oct 16 2019, 12:47:36)
[GCC 9.2.1 20190827 (Red Hat 9.2.1-1)]
Traceback (most recent call last):
File "runner.py", line 8, in <module>
assert 'py36' in cp.stdout
AssertionError
ERROR: InvocationError for command /home/churchyard/tmp/totox/.tox/py38/bin/python runner.py (exited with code 1)

==================================================== log end ====================================================
✖ FAIL py38 in 1.536 seconds
⠇ [1] py36ERROR: invocation failed (exit code 1), logfile: /home/churchyard/tmp/totox/.tox/py36/log/py36-5.log
=================================================== log start ===================================================
py36 run-test-pre: PYTHONHASHSEED='664963699'
py36 run-test: commands[0] | python runner.py
py36 recreate: /home/churchyard/tmp/totox/inner/.tox/py36
py36 run-test-pre: PYTHONHASHSEED='4138548204'
py36 run-test: commands[0] | python -c 'import sys; print(sys.version)'
3.6.9 (default, Jul  3 2019, 15:08:07)
[GCC 9.1.1 20190503 (Red Hat 9.1.1-1)]
Traceback (most recent call last):
File "runner.py", line 9, in <module>
assert 'py37' in cp.stdout
AssertionError
ERROR: InvocationError for command /home/churchyard/tmp/totox/.tox/py36/bin/python runner.py (exited with code 1)

==================================================== log end ====================================================
✖ FAIL py36 in 4.851 seconds
____________________________________________________ summary ____________________________________________________
ERROR:   py36: parallel child exit code 1
ERROR:   py37: parallel child exit code 1
ERROR:   py38: parallel child exit code 1

# Fixed code
def _getenvdata(self, reader, config):
    from_option = self.config.option.env
    from_environ = os.environ.get("TOXENV")
    from_config = reader.getstring("envlist", replace=False)

    env_list = []
    envlist_explicit = False
    if (from_option and "ALL" in from_option) or (
        not from_option and from_environ and "ALL" in from_environ.split(",")
    ):
        all_envs = self._getallenvs(reader)
    else:
        candidates = (
            (os.environ.get(PARALLEL_ENV_VAR_KEY_PRIVATE), True),
            (from_option, True),
            (from_environ, True),
            ("py" if self.config.option.devenv is not None else None, False),
            (from_config, False),
        )
        env_str, envlist_explicit = next(
            ((i, e) for i, e in candidates if i), ([], False)
        )
        env_list = _split_env(env_str)
        all_envs = self._getallenvs(reader, env_list)

    if not env_list:
        env_list = all_envs

    package_env = config.isolated_build_env
    if config.isolated_build is True and package_env in all_envs:
        all_envs.remove(package_env)

    if config.isolated_build is True and package_env in env_list:
        msg = "isolated_build_env {} cannot be part of envlist".format(package_env)
        raise tox.exception.ConfigError(msg)
    return env_list, all_envs, _split_env(from_config), envlist_explicit