From 5af7c94ffd00297d03aaefcd8d0bc0ab3c994634 Mon Sep 17 00:00:00 2001 From: Abhishek Dasgupta Date: Tue, 7 May 2024 21:50:19 +0100 Subject: [PATCH] tests: add test for at(1) exiting with error code --- tests/test_main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_main.py b/tests/test_main.py index 7fba755..f14b9c8 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -47,6 +47,12 @@ def test_schedule_at_missing(): ) +def test_schedule_at_failure(): + assert schedule_at(OUTPUT, ["ls"], at_command="/usr/bin/false").startswith( + "Scheduling with at failed with code 1, see output below:" + ) + + def raiseLocationError(): raise InvalidLocationError