def test_from_xml_updates_sequencer_hierarchy_with_shots_removed(self):
    'testing if from_xml method will update Sequences and shots\n        correctly with the xml file\n        '
    path = os.path.abspath('./test_data/test_v003.xml')
    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)
    self.assertEqual(shot1.track.get(), 1)
    self.assertEqual(shot2.track.get(), 1)
    self.assertEqual(shot3.track.get(), 1)
    sm.from_xml(path)
    self.assertEqual(2, 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('0030', shot3.shotName.get())
    self.assertEqual(1, shot3.track.get())
    self.assertEqual(55.0, shot3.sequenceStartFrame.get())
    self.assertEqual(110.0, shot3.sequenceEndFrame.get())
    self.assertEqual(65.0, shot3.startFrame.get())
    self.assertEqual(120.0, shot3.endFrame.get())
testing if from_xml method will update Sequences and shots
correctly with the xml file
def test_from_xml_updates_sequencer_hierarchy_with_shots_removed(self):
    'testing if from_xml method will update Sequences and shots\n        correctly with the xml file\n        '
    path = os.path.abspath('./test_data/test_v003.xml')
    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)
    self.assertEqual(shot1.track.get(), 1)
    self.assertEqual(shot2.track.get(), 1)
    self.assertEqual(shot3.track.get(), 1)
    sm.from_xml(path)
    self.assertEqual(2, 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('0030', shot3.shotName.get())
    self.assertEqual(1, shot3.track.get())
    self.assertEqual(55.0, shot3.sequenceStartFrame.get())
    self.assertEqual(110.0, shot3.sequenceEndFrame.get())
    self.assertEqual(65.0, shot3.startFrame.get())
    self.assertEqual(120.0, shot3.endFrame.get())