From ceed1e3b816ebcf103b07e5a2dd004aabb2c4145 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Fri, 8 Mar 2024 10:24:46 +0100 Subject: tests: use proper unit test skip instead of prints Using unittest skip instead of print unclutters display by not printing skip messages when not applicable, e.g. when somebody runs tests which are unrelated to netns tests, e.g. with FILTER=vapi. Type: fix Fixes: e416893a59 Change-Id: Ie09e213249aa47da7e4ff484c3d072fbce3c2001 Signed-off-by: Klement Sekera --- test/vm_vpp_interfaces.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/vm_vpp_interfaces.py b/test/vm_vpp_interfaces.py index ed2d55b834a..cb48fee6f6a 100644 --- a/test/vm_vpp_interfaces.py +++ b/test/vm_vpp_interfaces.py @@ -126,7 +126,7 @@ def create_test(test_name, test, ip_version, mtu): ) ) else: - print( + return unittest.skip( f"Skipping test:{test_name} as mtu:{mtu} is " f"invalid for TCP/IPv{ip_version}" ) @@ -146,8 +146,6 @@ def generate_vpp_interface_tests(tests, test_class): generated tests are set as attributes. """ - if config.skip_netns_tests: - print("Skipping netns tests") for test in tests: for ip_version in test_config["ip_versions"]: for mtu in test_config["mtus"]: -- cgit 1.2.3-korg