'internal env changes should not bleed out, but task env changes should'

@server(port=2200)
@server(port=2201)
def test_should_not_mutate_its_own_env_vars(self):

    @parallel
    @hosts('username@127.0.0.1:2200', 'username@127.0.0.1:2201')
    def mytask():
        run('ls    /simple')
    assertions = {'parallel': False, 'all_hosts': [], 'host': None, 'hosts': [], 'host_string': None}
    for (key, value) in assertions.items():
        eq_(env[key], value)
    with hide('everything'):
        result = execute(mytask)
    eq_(len(result), 2)
    for (key, value) in assertions.items():
        eq_(env[key], value)
