Skip to content

Commit

Permalink
gh #247 updated test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
KarthikeyanR470 committed Nov 18, 2024
1 parent 0d426dc commit 11e73b1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import time

dir_path = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(dir_path))
sys.path.append(os.path.join(dir_path, "../../"))


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def testFunction(self):
supportedZoomModes = self.testdsVideoDevice.getSupportedZoomModes(device)

for zoomMode in supportedZoomModes:
stream = stream.replace("\\", "/")
self.testPlayer.play(stream)
self.log.stepStart(f'Zoom Mode test, device:{device}, zoomMode:{zoomMode}')
self.testdsVideoDevice.setZoomMode(device, zoomMode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import time

dir_path = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(dir_path))
sys.path.append(os.path.join(dir_path, "../../"))

from L3_TestCases.dsVideoDevice.dsVideoDeviceHelperClass import dsVideoDeviceHelperClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import time

dir_path = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(dir_path))
sys.path.append(os.path.join(dir_path, "../../"))

from L3_TestCases.dsVideoDevice.dsVideoDeviceHelperClass import dsVideoDeviceHelperClass
Expand Down
9 changes: 8 additions & 1 deletion host/tests/dsClasses/dsVideoDevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,14 @@ def getSupportedZoomModes(self, device:str="VideoDevice0"):
supported_ZoomModes = []

deviceNum = int(device.replace(self.devicePrefix, "")) + 1
zoomModes = self.deviceProfile.get("Device").get(deviceNum).get("SupportedDFCs")

device_data = self.deviceProfile.fields.get("Device")
if isinstance(device_data, dict):
device_entry = device_data.get(deviceNum)
if isinstance(device_entry, dict):
zoomModes = device_entry.get("SupportedDFCs")


if zoomModes is None or zoomModes == 0:
return supported_ZoomModes

Expand Down

0 comments on commit 11e73b1

Please sign in to comment.