From 76c8677a095e5fb26806e2eca0e4d4f29682b18b 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 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/test_user_interface.py b/tests/test_user_interface.py index a941cb5..66932f6 100644 --- a/tests/test_user_interface.py +++ b/tests/test_user_interface.py @@ -976,3 +976,31 @@ 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_): + with pytest.raises(SystemExit): + self._create_args(input_, extraopts=['--release=dunfell']) + + @pytest.mark.parametrize('input_', + [ + { + 'oelint adv-test.bb': + ''' + VAR = "1" + ''', + } + ], + ) + def test_latest_alias(self, input_): + with pytest.raises(SystemExit): + self._create_args(input_, extraopts=['--release=latest'])