From 67594b800e4169509650a334cdf6f58ca8da44d4 Mon Sep 17 00:00:00 2001 From: Edmund Berenson Date: Sun, 2 Jun 2024 14:19:08 +0200 Subject: [PATCH] pytest: add additional test for hide error severity Signed-off-by: Edmund Berenson --- tests/test_user_interface.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/test_user_interface.py b/tests/test_user_interface.py index 4090841..a941cb5 100644 --- a/tests/test_user_interface.py +++ b/tests/test_user_interface.py @@ -546,6 +546,25 @@ def test_hide_warning(self, input_): issues = [x[1] for x in run(_args)] assert (not any([x for x in issues if ':warning:' in x])) + @pytest.mark.parametrize('input_', + [ + { + 'oelint adv-test.bb': + ''' + VAR = "1" + FILES = "foo" + ''', + }, + ], + ) + def test_hide_error(self, input_): + # local imports only + from oelint_adv.__main__ import run + + _args = self._create_args(input_, extraopts=['--hide', 'error']) + issues = [x[1] for x in run(_args)] + assert (not any([x for x in issues if ':error:' in x])) + @pytest.mark.parametrize('input_', [ {