def test_from_edl_updates_sequencer_hierarchy_with_shots_used_more_than_one_times(self):
    'testing if from_edl method will update Sequences and shots correctly\n        with shot are used more than once\n        '
    path = os.path.abspath('./test_data/test_v004.edl')
    sm = pymel.core.PyNode('sequenceManager1')
    sm.set_version('v001')
    seq = sm.create_sequence('SEQ001_HSNI_003')
    shot1 = seq.create_shot('0010')
    shot1.startFrame.set(0)
    shot1.endFrame.set(33)
    shot1.sequenceStartFrame.set(1)
    shot1.output.set('/tmp/SEQ001_HSNI_003_0010_v001.mov')
    shot1.handle.set(10)
    shot1.track.set(1)
    shot2 = seq.create_shot('0020')
    shot2.startFrame.set(34)
    shot2.endFrame.set(64)
    shot2.sequenceStartFrame.set(35)
    shot2.output.set('/tmp/SEQ001_HSNI_003_0020_v001.mov')
    shot2.handle.set(10)
    shot2.track.set(1)
    shot3 = seq.create_shot('0030')
    shot3.startFrame.set(65)
    shot3.endFrame.set(110)
    shot3.sequenceStartFrame.set(66)
    shot3.output.set('/tmp/SEQ001_HSNI_003_0030_v001.mov')
    shot3.handle.set(10)
    shot3.track.set(1)
    shot3.set_camera('persp')
    self.assertEqual(shot1.track.get(), 1)
    self.assertEqual(shot2.track.get(), 1)
    self.assertEqual(shot3.track.get(), 1)
    sm.from_edl(path)
    self.assertEqual(4, len(seq.shots.get()))
    self.assertEqual('0010', shot1.shotName.get())
    self.assertEqual(1, shot1.track.get())
    self.assertEqual(1.0, shot1.sequenceStartFrame.get())
    self.assertEqual(54.0, shot1.sequenceEndFrame.get())
    self.assertEqual((- 10.0), shot1.startFrame.get())
    self.assertEqual(43.0, shot1.endFrame.get())
    self.assertEqual('0020', shot2.shotName.get())
    self.assertEqual(1, shot2.track.get())
    self.assertEqual(55.0, shot2.sequenceStartFrame.get())
    self.assertEqual(76.0, shot2.sequenceEndFrame.get())
    self.assertEqual(44.0, shot2.startFrame.get())
    self.assertEqual(65.0, shot2.endFrame.get())
    self.assertEqual('0030', shot3.shotName.get())
    self.assertEqual(1, shot3.track.get())
    self.assertEqual(77.0, shot3.sequenceStartFrame.get())
    self.assertEqual(133.0, shot3.sequenceEndFrame.get())
    self.assertEqual(65.0, shot3.startFrame.get())
    self.assertEqual(121.0, shot3.endFrame.get())
    shot4 = seq.shots.get()[(- 1)]
    self.assertEqual('0030', shot4.shotName.get())
    self.assertEqual(1, shot4.track.get())
    self.assertEqual(133.0, shot4.sequenceStartFrame.get())
    self.assertEqual(189.0, shot4.sequenceEndFrame.get())
    self.assertEqual(65.0, shot4.startFrame.get())
    self.assertEqual(121.0, shot4.endFrame.get())
    self.assertEqual(shot3.get_camera(), shot4.get_camera())
testing if from_edl method will update Sequences and shots correctly
with shot are used more than once
def test_from_edl_updates_sequencer_hierarchy_with_shots_used_more_than_one_times(self):
    'testing if from_edl method will update Sequences and shots correctly\n        with shot are used more than once\n        '
    path = os.path.abspath('./test_data/test_v004.edl')
    sm = pymel.core.PyNode('sequenceManager1')
    sm.set_version('v001')
    seq = sm.create_sequence('SEQ001_HSNI_003')
    shot1 = seq.create_shot('0010')
    shot1.startFrame.set(0)
    shot1.endFrame.set(33)
    shot1.sequenceStartFrame.set(1)
    shot1.output.set('/tmp/SEQ001_HSNI_003_0010_v001.mov')
    shot1.handle.set(10)
    shot1.track.set(1)
    shot2 = seq.create_shot('0020')
    shot2.startFrame.set(34)
    shot2.endFrame.set(64)
    shot2.sequenceStartFrame.set(35)
    shot2.output.set('/tmp/SEQ001_HSNI_003_0020_v001.mov')
    shot2.handle.set(10)
    shot2.track.set(1)
    shot3 = seq.create_shot('0030')
    shot3.startFrame.set(65)
    shot3.endFrame.set(110)
    shot3.sequenceStartFrame.set(66)
    shot3.output.set('/tmp/SEQ001_HSNI_003_0030_v001.mov')
    shot3.handle.set(10)
    shot3.track.set(1)
    shot3.set_camera('persp')
    self.assertEqual(shot1.track.get(), 1)
    self.assertEqual(shot2.track.get(), 1)
    self.assertEqual(shot3.track.get(), 1)
    sm.from_edl(path)
    self.assertEqual(4, len(seq.shots.get()))
    self.assertEqual('0010', shot1.shotName.get())
    self.assertEqual(1, shot1.track.get())
    self.assertEqual(1.0, shot1.sequenceStartFrame.get())
    self.assertEqual(54.0, shot1.sequenceEndFrame.get())
    self.assertEqual((- 10.0), shot1.startFrame.get())
    self.assertEqual(43.0, shot1.endFrame.get())
    self.assertEqual('0020', shot2.shotName.get())
    self.assertEqual(1, shot2.track.get())
    self.assertEqual(55.0, shot2.sequenceStartFrame.get())
    self.assertEqual(76.0, shot2.sequenceEndFrame.get())
    self.assertEqual(44.0, shot2.startFrame.get())
    self.assertEqual(65.0, shot2.endFrame.get())
    self.assertEqual('0030', shot3.shotName.get())
    self.assertEqual(1, shot3.track.get())
    self.assertEqual(77.0, shot3.sequenceStartFrame.get())
    self.assertEqual(133.0, shot3.sequenceEndFrame.get())
    self.assertEqual(65.0, shot3.startFrame.get())
    self.assertEqual(121.0, shot3.endFrame.get())
    shot4 = seq.shots.get()[(- 1)]
    self.assertEqual('0030', shot4.shotName.get())
    self.assertEqual(1, shot4.track.get())
    self.assertEqual(133.0, shot4.sequenceStartFrame.get())
    self.assertEqual(189.0, shot4.sequenceEndFrame.get())
    self.assertEqual(65.0, shot4.startFrame.get())
    self.assertEqual(121.0, shot4.endFrame.get())
    self.assertEqual(shot3.get_camera(), shot4.get_camera())