diff --git a/tests/project_helpers.py b/tests/project_helpers.py index 83c4ba2c..0a467ece 100644 --- a/tests/project_helpers.py +++ b/tests/project_helpers.py @@ -146,7 +146,7 @@ def venv_script_lines(self, venv_path: Path) -> List[str]: for req in self.requirements ] + [ - f"{create_empty_file} {venv_path}/.installed", + f"{create_empty_file} {venv_path / '.installed'}", ] ) diff --git a/tests/test_real_projects.py b/tests/test_real_projects.py index 0eafb8ee..f782f3da 100644 --- a/tests/test_real_projects.py +++ b/tests/test_real_projects.py @@ -7,7 +7,9 @@ """ import json import logging +import os import subprocess +import sys import tarfile from dataclasses import dataclass from pathlib import Path @@ -51,7 +53,7 @@ def verify_requirements(venv_path: Path, requirements: List[str]) -> None: def run_fawltydeps_json( *args: str, venv_dir: Optional[Path], cwd: Optional[Path] = None ) -> JsonData: - argv = ["fawltydeps", "--config-file=/dev/null", "--json"] + argv = [sys.executable, "-m", "fawltydeps", f"--config-file={os.devnull}", "--json"] if venv_dir is not None: argv += [f"--pyenv={venv_dir}"] proc = subprocess.run(