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:
@@ -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'),
|
||||
]
|
||||
|
||||
|
Reference in New Issue
Block a user