Skip to content

Commit

Permalink
chore(virtualenv): pass no-rc in virtualenv test
Browse files Browse the repository at this point in the history
  • Loading branch information
gforsyth committed Jul 26, 2023
1 parent a65bf10 commit 59cb5bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from tempfile import TemporaryDirectory

import pytest

from xonsh import __version__
from xonsh.lexer import Lexer
from xonsh.platform import HAS_PYGMENTS, ON_WINDOWS, PYTHON_VERSION_INFO
Expand Down
11 changes: 10 additions & 1 deletion tests/test_virtualenv_activator.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def test_xonsh_activator(tmp_path):
sys.executable,
"-m",
"xonsh",
"--no-rc",
"-c",
"import shutil; shutil.which('python') or shutil.which('python3')",
]
Expand All @@ -35,7 +36,14 @@ def test_xonsh_activator(tmp_path):

# Activate
venv_python = check_output(
[sys.executable, "-m", "xonsh", "-c", f"source {activate_path}; which python"]
[
sys.executable,
"-m",
"xonsh",
"--no-rc",
"-c",
f"source {activate_path}; which python",
]
).decode()
assert Path(venv_python).parent == bin_path

Expand All @@ -45,6 +53,7 @@ def test_xonsh_activator(tmp_path):
sys.executable,
"-m",
"xonsh",
"--no-rc",
"-c",
f"source {activate_path}; deactivate; "
"import shutil; shutil.which('python') or shutil.which('python3')",
Expand Down

0 comments on commit 59cb5bf

Please sign in to comment.