Skip to content

Commit 1001e57

Browse files
authored
Merge pull request #19 from cadenmyers13/scrapmtm
sys stuff
2 parents 509d64d + 9825f92 commit 1001e57

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

tests/test_packsmanager.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import re
33
import subprocess
4+
import sys
45
from pathlib import Path
56

67
import pytest
@@ -375,16 +376,24 @@ def test_print_packs_and_examples(
375376
packs_to_install, expected, example_cases, capsys, conda_env
376377
):
377378
env_dir_str = Path(conda_env).as_posix()
378-
shell = os.name == "nt"
379379
req_dir = example_cases / "case5" / "requirements" / "packs"
380380
for pack in packs_to_install:
381381
req_file = (req_dir / f"{pack}.txt").as_posix()
382382
subprocess.run(
383-
["conda", "install", "-y", "--file", req_file, "-p", env_dir_str],
383+
[
384+
sys.executable,
385+
"-m",
386+
"conda",
387+
"install",
388+
"-y",
389+
"--file",
390+
req_file,
391+
"-p",
392+
env_dir_str,
393+
],
384394
check=True,
385395
capture_output=True,
386396
text=True,
387-
shell=shell,
388397
)
389398
pm = PacksManager(root_path=example_cases / "case5")
390399
pm.print_packs()

0 commit comments

Comments
 (0)