Skip to content
Snippets Groups Projects
Commit 63573d48 authored by Stefano Borini's avatar Stefano Borini
Browse files

Changed MCO to Environment in source

parent 81727892
No related branches found
No related tags found
1 merge request!69Introduce slots and resolution of named variables
......@@ -5,15 +5,17 @@ from ..local_traits import Identifier
class InputSlotMap(HasStrictTraits):
"""
Class that specifies the origin of data for the slots of a data source.
This entity will go in the model object, and associates the order
it is in the containing tlist with the variable name the value
should be taken from.
Class that specifies the origin of data for the slots of a data source
or KPI calculator.
This entity will go in the model object, and associates the positional
order in the containing list with the variable name that refers to the
value that should be taken.
"""
#: Where the value will come from.
#: At the moment, only MCO is supported: the source is the MCO parameter
#: with name specified at ``name``.
source = Enum('MCO')
#: At the moment, only the Environment is supported: the source is the
#: parameter in the current execution environment with the name specified
#: as ``name``.
source = Enum('Environment')
#: The user defined name of the variable containing the value.
name = Identifier()
......@@ -8,7 +8,7 @@ class TestDataValue(unittest.TestCase):
def test_initialization(self):
slotmap = InputSlotMap()
self.assertEqual(slotmap.source, "MCO")
self.assertEqual(slotmap.source, "Environment")
self.assertEqual(slotmap.name, "")
with self.assertRaises(TraitError):
slotmap.name = "000"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment