diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d30d44c..3a5e746 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,7 +53,7 @@ repos: - pytest>=6.1.2 - enrich>=1.2.5 - repo: https://github.com/PyCQA/pylint - rev: v3.0.0a6 + rev: v3.0.3 hooks: - id: pylint additional_dependencies: diff --git a/test/test_unit.py b/test/test_unit.py index 652fce9..126ee4b 100644 --- a/test/test_unit.py +++ b/test/test_unit.py @@ -142,3 +142,10 @@ def test_run_compat() -> None: assert ours.stdout == original.stdout assert ours.stderr == original.stderr assert ours.args == original.args + + +def test_run_waits_for_completion(tmp_path): + """run() should always wait for the process to complete.""" + tmpfile = tmp_path / "output.txt" + run(f"sleep 0.1 && echo 42 > {str(tmpfile)}") + assert tmpfile.read_text() == "42\n"