From cd25f249f13c491d72b1c27283605bbe6414d88e Mon Sep 17 00:00:00 2001 From: Konrad Weihmann Date: Sun, 13 Oct 2024 11:15:45 +0000 Subject: [PATCH] tests: add missing coverage Signed-off-by: Konrad Weihmann --- tests/test_user_interface.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tests/test_user_interface.py b/tests/test_user_interface.py index a941cb5..c5696dc 100644 --- a/tests/test_user_interface.py +++ b/tests/test_user_interface.py @@ -976,3 +976,33 @@ def test_release_no_author(self, input_): def test_release_invalid(self, input_): with pytest.raises(SystemExit): self._create_args(input_, extraopts=['--release=doesnotexist']) + + @pytest.mark.parametrize('input_', + [ + { + 'oelint adv-test.bb': + ''' + VAR = "1" + ''', + } + ], + ) + def test_no_known_variable_file(self, input_): + from oelint_adv.__main__ import run + + run(self._create_args(input_, extraopts=['--release=dunfell'])) + + @pytest.mark.parametrize('input_', + [ + { + 'oelint adv-test.bb': + ''' + VAR = "1" + ''', + } + ], + ) + def test_latest_alias(self, input_): + from oelint_adv.__main__ import run + + run(self._create_args(input_, extraopts=['--release=latest']))