Unmux output dir generation
This commit is contained in:
@@ -35,7 +35,13 @@ if pytest is not None:
|
||||
SRC_ROOT = Path(__file__).resolve().parents[2] / "src"
|
||||
|
||||
|
||||
def run_ffx_unmux(workdir: Path, home_dir: Path, database_path: Path, *args: str) -> subprocess.CompletedProcess[str]:
|
||||
def run_ffx_unmux(
|
||||
workdir: Path,
|
||||
home_dir: Path,
|
||||
database_path: Path,
|
||||
*args: str,
|
||||
input_text: str | None = None,
|
||||
) -> subprocess.CompletedProcess[str]:
|
||||
env = os.environ.copy()
|
||||
env["HOME"] = str(home_dir)
|
||||
existing_pythonpath = env.get("PYTHONPATH", "")
|
||||
@@ -50,7 +56,14 @@ def run_ffx_unmux(workdir: Path, home_dir: Path, database_path: Path, *args: str
|
||||
"unmux",
|
||||
*args,
|
||||
]
|
||||
return subprocess.run(command, cwd=workdir, env=env, capture_output=True, text=True)
|
||||
return subprocess.run(
|
||||
command,
|
||||
cwd=workdir,
|
||||
env=env,
|
||||
capture_output=True,
|
||||
input=input_text,
|
||||
text=True,
|
||||
)
|
||||
|
||||
|
||||
class UnmuxCliTests(unittest.TestCase):
|
||||
@@ -164,6 +177,7 @@ class UnmuxCliTests(unittest.TestCase):
|
||||
"--label",
|
||||
"dball",
|
||||
str(source_path),
|
||||
input_text="y\n",
|
||||
)
|
||||
self.assertCompleted(completed)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user