Skip to content

Commit

Permalink
Apply changes from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
mrclary committed Mar 5, 2024
1 parent e103465 commit 374d4da
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion spyder/utils/tests/test_conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,17 @@ def test_get_conda_root_prefix():

@pytest.mark.skipif(not running_in_ci(), reason="Only meant for CIs")
def test_find_conda():
# Standard test
assert find_conda()

# Test with test environment
# Temporarily remove CONDA_EXE and MAMBA_EXE, if present
conda_exe = os.environ.pop('CONDA_EXE', None)
mamba_exe = os.environ.pop('MAMBA_EXE', None)

assert find_conda()
assert find_conda(TEST_PYEXEC)

# Restore os.environ
if conda_exe is not None:
os.environ['CONDA_EXE'] = conda_exe
if mamba_exe is not None:
Expand Down

0 comments on commit 374d4da

Please sign in to comment.