Skip to content

Commit

Permalink
Issue #78 get_frame should return either a string or a tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
thompson318 committed Sep 27, 2023
1 parent 44bd71d commit 08f1677
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions tests/polaris_mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ def mockndiGetBXTransform(self, _device, _port_handle): #pylint:disable=invalid-
sksurgerycore.tests.algorithms
"""
assert self.bx_frame_count > 0

return concatenate((self.rotation, self.position, self.quality))
#the base ndicapi library uses Py_BuildValue to return the transform
#as a tuple of double float values, so let's make sure we're als
#returning a tuple
return tuple(concatenate((self.rotation, self.position, self.quality)))

def mockndiGetBXTransformMissing(self, _device, _port_handle): #pylint:disable=invalid-name
"""Mock of ndiGetBXTransform"""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_sksurgerynditracker_mockndi_getframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def test_getframe_missing(mocker):
bxsource.mockndiGetBXTransformMissing)

tracker = NDITracker(SETTINGS_POLARIS)
(port_handles, time_stamps, frame_numbers, tracking,
tracking_quality ) = tracker.get_frame()
(port_handles, time_stamps, frame_numbers, _tracking,
_tracking_quality ) = tracker.get_frame()
print (port_handles)
print (time_stamps)
print (frame_numbers)
Expand Down

0 comments on commit 08f1677

Please sign in to comment.