Skip to content

Commit

Permalink
debugging github actions- is pip installing into correct env within t…
Browse files Browse the repository at this point in the history
…est?
  • Loading branch information
ljwoods2 committed May 25, 2024
1 parent 94dae28 commit ca6b6f5
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/test_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ def test_install_and_import(tmpdir):
with tmpdir.as_cwd():
kit = CookiecutterMDAKit(template_analysis_class="MyAnalysisClass")
kit.run()
result = subprocess.run([sys.executable,
"-m", "pip", "install",
result = subprocess.run(["python", "-m", "pip", "install",
"-e", "./test-mda-kit"],
capture_output=True, text=True)
if result.returncode != 0:
Expand All @@ -86,3 +85,16 @@ def test_install_and_import(tmpdir):
import test_mdakit_package
except ImportError as e:
pytest.fail(f"Failed to import 'test_mdakit_package': {e}")

def test_gh_actions_debug_python_env(tmpdir):
with tmpdir.as_cwd():

result = subprocess.run(["python", "-m", "pip", "install",
"mdanalysistests"],
capture_output=True, text=True)
if result.returncode != 0:
pytest.fail(f"Failed to install: {result.stderr}")
try:
import MDAnalysisTests
except ImportError as e:
pytest.fail(f"Failed to import 'MDAnalysisTests': {e}")

0 comments on commit ca6b6f5

Please sign in to comment.