[4/9] tests/fetch: Improve the verbose messages for skipped tests

Message ID 20220129022939.19329-4-pkj@axis.com
State Accepted, archived
Commit e551328a4595c220b94ab5002d978ddb4deeebcf
Headers show
Series [1/9] bitbake-user-manual: Remove unnecessary \n from a PREMIRRORS example | expand

Commit Message

Peter Kjellerstedt Jan. 29, 2022, 2:29 a.m. UTC
This changes:

  test_foo .. skipped 'Network tests being skipped'
  test_foo .. skipped 'npm not installed, tests being skipped'

to:

  test_foo .. skipped 'network test'
  test_foo .. skipped 'npm not installed'

to avoid double "skipped" in the output.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 bitbake/lib/bb/tests/fetch.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index c654662c02..5cccdf6ef4 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -18,7 +18,7 @@  from bb.tests.support.httpserver import HTTPService
 
 def skipIfNoNetwork():
     if os.environ.get("BB_SKIP_NETTESTS") == "yes":
-        return unittest.skip("Network tests being skipped")
+        return unittest.skip("network test")
     return lambda f: f
 
 class URITest(unittest.TestCase):
@@ -2301,7 +2301,7 @@  class NPMTest(FetcherTest):
     def skipIfNoNpm():
         import shutil
         if not shutil.which('npm'):
-            return unittest.skip('npm not installed, tests being skipped')
+            return unittest.skip('npm not installed')
         return lambda f: f
 
     @skipIfNoNpm()