From 59cc05c395a278eb64edfb1903d0470901befcba Mon Sep 17 00:00:00 2001 From: Kristian Larsson Date: Mon, 11 Nov 2024 10:58:58 +0100 Subject: [PATCH] If there is nothing to test, say so Maybe we should give hints about excessive filtering or something? --- base/src/testing.act | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base/src/testing.act b/base/src/testing.act index 8c2565666..a3a7e92a4 100644 --- a/base/src/testing.act +++ b/base/src/testing.act @@ -981,7 +981,11 @@ class ProjectTestResults(object): print("") if complete: - if errors > 0 and failures > 0: + if self.num_tests() == 0: + print("Nothing to test") + print() + return 0 + elif errors > 0 and failures > 0: print(term.bold + term.red + "%d error and %d failure out of %d tests (%ss)" % (errors, failures, self.num_tests(), self.sw.elapsed().str_ms()) + term.normal) print() return 2