Skip to content

Conversation

@pmezard
Copy link
Contributor

@pmezard pmezard commented Aug 29, 2016

isolate() captures current env variable values, overwrites them, yields,
then restores them. Unfortunately the capturing code was broken and the
env variables were wiped out during the restore phase.

def test_env():
@click.command()
def cli_env():
click.echo('ENV={}'.format(os.environ['TEST_CLICK_ENV']))

This comment was marked as off-topic.

isolate() captures current env variable values, overwrites them, yields,
then restores them. Unfortunately the capturing code was broken and the
env variables were wiped out during the restore phase.
@pmezard pmezard force-pushed the fix-tests-env-mocking branch from 3f36e04 to 0270282 Compare August 29, 2016 15:53
@pmezard
Copy link
Contributor Author

pmezard commented Aug 29, 2016

My bad, I was lazy and did not run tox. Tests pass here on py26, py27 and manually with py35. I pushed --force the change, tell me if you prefer I pile commits fixing review comments instead.

untitaker added a commit that referenced this pull request Aug 29, 2016
@untitaker
Copy link
Contributor

Applied to 6.x-maintenance and master. Thanks!

@untitaker untitaker closed this Aug 29, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants