Fix tests for empty nixfile

This commit is contained in:
Bryan Bennett 2022-12-09 20:14:58 -05:00
parent 7af01eeb72
commit 77efe5abca
No known key found for this signature in database
GPG key ID: EF90E3E98B8F5C0B
2 changed files with 16 additions and 6 deletions

View file

@ -35,7 +35,15 @@ def test_args(direnv_project: DirenvProject) -> None:
def test_no_files(direnv_project: DirenvProject) -> None:
direnv_project.setup_envrc("use nix -p hello")
direnv_exec(direnv_project, "hello")
out = run(
["direnv", "status"],
stderr=subprocess.PIPE,
stdout=subprocess.PIPE,
check=False,
cwd=direnv_project.dir,
)
assert out.returncode == 0
assert 'Loaded watch: "."' not in out.stdout
if __name__ == "__main__":