support/testing: test_which.py: use assertRunNotOk()

Use the helper to simplify the test.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Peter Korsgaard
2026-06-18 14:48:20 +02:00
parent 8ffa090560
commit 6f39a9ba29

View File

@@ -33,8 +33,7 @@ class TestWhich(infra.basetest.BRTest):
# We check "which" returns an error when the program is not
# found.
_, ret = self.emulator.run(f"which {alias_name}")
self.assertNotEqual(ret, 0)
self.assertRunNotOk(f"which {alias_name}")
# We define a shell alias.
alias_cmd = "/bin/true"