From 8fa9a6968360d625a4fd00398a28e3fdb7c86381 Mon Sep 17 00:00:00 2001 From: morganamilo Date: Mon, 27 Sep 2021 21:03:43 +0100 Subject: [PATCH] pactest: fix test errors being treated as success Rules return -1 if there was an error with the rule itself. Later this return value is passed to tap as a bool. Because -1 is a truthy value it gets treated as success. --- test/pacman/pmtest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py index 94b0930f..354c084a 100644 --- a/test/pacman/pmtest.py +++ b/test/pacman/pmtest.py @@ -322,7 +322,7 @@ class pmtest(object): self.result["success"] += 1 else: self.result["fail"] += 1 - tap.ok(success, i) + tap.ok(success == 1, i) def configfile(self): return os.path.join(self.root, util.PACCONF)