From 99897124e610353228bd228877eb9ac6123e6702 Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Tue, 22 Dec 2020 10:51:23 -0600 Subject: [PATCH] Verify extension does not modify alt score --- test/test_unit_score_file.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/test_unit_score_file.py b/test/test_unit_score_file.py index 5719fe4..450c154 100644 --- a/test/test_unit_score_file.py +++ b/test/test_unit_score_file.py @@ -196,6 +196,28 @@ def test_score_values( assert run.out == expected +@pytest.mark.parametrize('ext', [None, 'e', 'extension']) +def test_extensions(runner, yadm, ext): + """Verify extensions do not effect scores""" + local_user = 'testuser' + filename = f'filename##u.{local_user}' + if ext: + filename += f',{ext}.xyz' + expected = '' + script = f""" + YADM_TEST=1 source {yadm} + score=0 + local_user={local_user} + score_file "{filename}" + echo "$score" + """ + expected = f'{1000 + CONDITION["user"]["modifier"]}\n' + run = runner(command=['bash'], inp=script) + assert run.success + assert run.err == '' + assert run.out == expected + + def test_score_values_templates(runner, yadm): """Test score results""" local_class = 'testclass'