Skip to content

Commit

Permalink
Adding missing wrapper function for RegisterOutputPath (AcademySoftwa…
Browse files Browse the repository at this point in the history
…reFoundation#363)

* adding missing wrapper function for RegisterOutputPath

* removed unnecessary line from readme.
  • Loading branch information
Greg Denton authored Jul 1, 2019
1 parent d5c8480 commit 388399d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
1 change: 0 additions & 1 deletion cuebot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ NOTE: Only OpenCue developers will need to do this setup. If you just want to us

View > Tool Windows > Gradle. Refresh the Gradle project and run the build task, which will
run compilation and tests.

9 changes: 9 additions & 0 deletions pycue/opencue/wrappers/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,15 @@ def createFrameByFrameDependency(self, layer):
# @param kill: wheather or not to kill the frames as well"""
# self.proxy.unbookProcs([a.proxy for a in subs], number, kill)

def registerOutputPath(self, outputPath):
"""Register an output with the given layer. The output paths are sent in the opencue email.
@type outputPath: str
@param outputPath: Output path to register
"""
self.stub.RegisterOutputPath(
job_pb2.LayerRegisterOutputPathRequest(layer=self.data, spec=outputPath),
timeout=Cuebot.Timeout)

def reorderFrames(self, range, order):
"""Reorders the specified frame range on this layer.
@type range: string
Expand Down
14 changes: 14 additions & 0 deletions pycue/tests/wrappers/layer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,20 @@ def testCreateFrameByFrameDependency(self, getStubMock):
timeout=mock.ANY)
self.assertEqual(depend.id(), dependId)

def testRegisterOutputPath(self, getStubMock):
stubMock = mock.Mock()
stubMock.RegisterOutputPath.return_value = job_pb2.LayerRegisterOutputPathResponse()
getStubMock.return_value = stubMock

outputPath = '/test/output/path'
layer = opencue.wrappers.layer.Layer(
job_pb2.Layer(name=TEST_LAYER_NAME))
layer.registerOutputPath(outputPath)

stubMock.RegisterOutputPath.assert_called_with(
job_pb2.LayerRegisterOutputPathRequest(layer=layer.data, spec=outputPath),
timeout=mock.ANY)

def testReorderFrames(self, getStubMock):
stubMock = mock.Mock()
stubMock.ReorderFrames.return_value = job_pb2.LayerReorderFramesResponse()
Expand Down

0 comments on commit 388399d

Please sign in to comment.