Skip to content

Commit

Permalink
fix test case again and again, what the fffff happend on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoTian committed Aug 18, 2016
1 parent 950106c commit fa31356
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,22 +103,18 @@ def run_command(command, prefix, *arguments):

@contextmanager
def make_temp_env(*packages, **kwargs):
import os
prefix = kwargs.pop('prefix', None) or make_temp_prefix()
assert isdir(prefix), prefix
prefix = escape_for_winpath(prefix)
with stderr_log_level(DEBUG, 'conda'), stderr_log_level(DEBUG, 'requests'):
with disable_logger('fetch'), disable_logger('dotupdate'):
try:
# try to clear any config that's been set by other tests
reset_context([join(prefix, 'condarc')])
run_command(Commands.CREATE, prefix, *packages)
os.environ["CONDA_ROOT"] = prefix
os.environ["CONDA_PREFIX"] = prefix
yield prefix
finally:
rmtree(prefix, ignore_errors=True)
os.environ.pop('CONDA_ROOT', None)
os.environ.pop('CONDA_PREFIX', None)


def reload_config(prefix):
Expand Down

0 comments on commit fa31356

Please sign in to comment.