From d1784a21c3b0f437cb60c8516a150d732ba1c5ea Mon Sep 17 00:00:00 2001 From: Sudarshan Kumar Date: Mon, 8 Apr 2019 18:47:18 +0530 Subject: [PATCH] Pyunit decision_path.py Pyunit decision_path.py Issue-ID: OPTFRA-302 Change-Id: Ib495c52324dbe28a294321406130eda7e53659e2 Signed-off-by: Sudarshan Kumar --- .../unit/solver/optimizer/test_decision_path.py | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 conductor/conductor/tests/unit/solver/optimizer/test_decision_path.py diff --git a/conductor/conductor/tests/unit/solver/optimizer/test_decision_path.py b/conductor/conductor/tests/unit/solver/optimizer/test_decision_path.py new file mode 100644 index 0000000..11ea7c7 --- /dev/null +++ b/conductor/conductor/tests/unit/solver/optimizer/test_decision_path.py @@ -0,0 +1,41 @@ +# +# ------------------------------------------------------------------------- +# Copyright (C) 2019 IBM. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ------------------------------------------------------------------------- +# + +"""Test class for optimizer decision_path.py""" + +import unittest +from conductor.solver.optimizer.decision_path import DecisionPath + + +class TestDecisionPath(unittest.TestCase): + + def setUp(self): + self.decisionPath = DecisionPath() + + def test_decision_path(self): + self.assertEqual(0.0, self.decisionPath.cumulated_value) + self.assertEqual(0.0, self.decisionPath.cumulated_cost) + self.assertEqual(0.0, self.decisionPath.heuristic_to_go_value) + self.assertEqual(0.0, self.decisionPath.heuristic_to_go_cost) + self.assertEqual(0.0, self.decisionPath.total_value) + self.assertEqual(0.0, self.decisionPath.total_cost) + + +if __name__ == '__main__': + unittest.main() -- 2.16.6