Download code/tests/test_audit_g6_eval_scripts_launch.py from viai957/align: direct link, hf CLI and curl.
- Browser
- Download file 898 Bytes
-
https://huggingface.co/viai957/align/resolve/main/code/tests/test_audit_g6_eval_scripts_launch.py
- Command line
-
hf download hf://viai957/align/code/tests/test_audit_g6_eval_scripts_launch.py
-
curl -L -o test_audit_g6_eval_scripts_launch.py https://huggingface.co/viai957/align/resolve/main/code/tests/test_audit_g6_eval_scripts_launch.py
898 Bytes
| """U11-6: documented launch lines must work without PYTHONPATH (align is not installed).""" | |
| import os | |
| import subprocess | |
| import sys | |
| import pytest | |
| REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
| SCRATCH = os.path.join(REPO, ".tmp", "audit_2026-10-14", "scratch_g6_eval_scripts") | |
| def test_script_help_runs_from_a_foreign_cwd_without_pythonpath(script): | |
| os.makedirs(SCRATCH, exist_ok=True) | |
| env = {k: v for k, v in os.environ.items() if k != "PYTHONPATH"} | |
| env["CUDA_VISIBLE_DEVICES"] = "" | |
| r = subprocess.run( | |
| [sys.executable, "-B", os.path.join(REPO, "scripts", f"{script}.py"), "--help"], | |
| cwd=SCRATCH, env=env, capture_output=True, text=True, timeout=120, | |
| ) | |
| assert "No module named 'align'" not in r.stderr, r.stderr | |
| assert r.returncode == 0, r.stderr | |