Skip to content

Commit 00843eb

Browse files
committed
feature: Add more APIs to L0 Sysman python binding
Related-To: NEO-18602 Add following apis to python: 1. zesFrequencyGetProperties 2. zesPowerGetProperties 3. zesPowerGetUsage Signed-off-by: Aviral Nigam <aviral.nigam@intel.com>
1 parent 6cf4dbe commit 00843eb

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

bindings/sysman/python/test/unit_tests/test_frequency.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
@patch("pyzes.getFunctionPointerList")
2323
class TestFrequencyFunctions(unittest.TestCase):
24-
2524
def setUp(self):
2625
import pyzes
2726

@@ -130,5 +129,6 @@ def mock_get_properties(frequency_handle, properties_ptr):
130129
mock_get_func.assert_called_with("zesFrequencyGetProperties")
131130
mock_func.assert_called_once()
132131

132+
133133
if __name__ == "__main__":
134134
unittest.main()

bindings/sysman/python/test/unit_tests/test_power.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
@patch("pyzes.getFunctionPointerList")
2323
class TestPowerFunctions(unittest.TestCase):
24-
2524
def setUp(self):
2625
import pyzes
2726

@@ -153,11 +152,16 @@ def mock_get_properties(power_handle, properties_ptr):
153152
self.assertEqual(properties.defaultLimit, mock_default_limit)
154153
self.assertEqual(properties.minLimit, mock_min_limit)
155154
self.assertEqual(properties.maxLimit, mock_max_limit)
156-
self.assertEqual(ext_properties.stype, self.pyzes.ZES_STRUCTURE_TYPE_POWER_EXT_PROPERTIES)
155+
self.assertEqual(
156+
ext_properties.stype, self.pyzes.ZES_STRUCTURE_TYPE_POWER_EXT_PROPERTIES
157+
)
157158
self.assertEqual(ext_properties.domain, mock_domain)
158-
self.assertEqual(ext_properties.defaultLimit.contents.limit, mock_ext_default_limit)
159+
self.assertEqual(
160+
ext_properties.defaultLimit.contents.limit, mock_ext_default_limit
161+
)
159162
mock_get_func.assert_called_with("zesPowerGetProperties")
160163
mock_func.assert_called_once()
161164

165+
162166
if __name__ == "__main__":
163167
unittest.main()

0 commit comments

Comments
 (0)