1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-01 10:52:33 +01:00

Parameter: Fixed overriding of new parameters

Previously you could have `override` set to True on parameters that
only existed in the current scope.

Now if you try to override a parameter that doesn't exist higher up
in the hiarchy you will get a ValueError.
This commit is contained in:
Sebastian Goscik
2016-02-04 15:36:47 +00:00
parent dec574e59e
commit 519efaf22c
2 changed files with 26 additions and 8 deletions

View File

@@ -324,7 +324,14 @@ class ParametersTest(TestCase):
def test_duplicate_param_override(self):
class DuplicateParamExtension(MyBaseExtension): # pylint: disable=W0612
parameters = [
Parameter('food', override=True, default='cheese'),
Parameter('base', override=True, default='buttery'),
Parameter('base', override=True, default='biscuit'),
]
@raises(ValueError)
def test_overriding_new_param(self):
class DuplicateParamExtension(MyBaseExtension): # pylint: disable=W0612
parameters = [
Parameter('food', override=True, default='cheese'),
]