Skip to content

Commit

Permalink
umu_test: add test for check_runtime for invalid build directory
Browse files Browse the repository at this point in the history
R1kaB3rN committed May 29, 2024

Verified

This commit was signed with the committer’s verified signature.
1 parent d4a8a4f commit 756186f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions umu/umu_test.py
Original file line number Diff line number Diff line change
@@ -215,6 +215,19 @@ def test_check_runtime_success(self):
)
self.assertEqual(result, 0, "Expected the exit code 0")

def test_check_runtime_dir(self):
"""Test check_runtime when passed a BUILD_ID that does not exist."""
build = "foo"
json_root = umu_runtime._get_json(
self.test_user_share, "umu_version.json"
)
mock = CompletedProcess(["foo"], 1)
with patch.object(umu_runtime, "run", return_value=mock):
result = umu_runtime.check_runtime(
self.test_user_share, json_root, build
)
self.assertEqual(result, 1, "Expected the exit code 1")

def test_move(self):
"""Test _move when copying a directory or a file.

0 comments on commit 756186f

Please sign in to comment.