Verify extension does not modify alt score

This commit is contained in:
Tim Byrne 2020-12-22 10:51:23 -06:00
parent d298b42653
commit 99897124e6
No known key found for this signature in database
GPG Key ID: 14DB4FC2465A4B12
1 changed files with 22 additions and 0 deletions

View File

@ -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'