def test_from_xml_generates_correct_sequencer_hierarchy(self):
    'testing if from_xml method will generate Sequences and shots\n        correctly\n        '
    path = os.path.abspath('./test_data/test_v001.xml')
    sm = pymel.core.PyNode('sequenceManager1')
    sm.from_xml(path)
    sequences = sm.sequences.get()
    self.assertEqual(len(sequences), 1)
    sequencer = sequences[0]
    self.assertIsInstance(sequencer, pymel.core.nt.Sequencer)
    self.assertEqual(sequencer.duration, 111)
    self.assertEqual(sequencer.sequence_name.get(), 'SEQ001_HSNI_003')
    self.assertEqual(pymel.core.currentUnit(q=1, t=1), 'film')
    time = pymel.core.PyNode('time1')
    self.assertEqual(time.timecodeProductionStart.get(), 0.0)
    shots = sequencer.shots.get()
    self.assertEqual(len(shots), 3)
    shot1 = shots[0]
    shot2 = shots[1]
    shot3 = shots[2]
    self.assertEqual('0010', shot1.shotName.get())
    self.assertEqual(1024, shot1.wResolution.get())
    self.assertEqual(778, shot1.hResolution.get())
    self.assertEqual(1, shot1.track.get())
    self.assertEqual(1.0, shot1.sequenceStartFrame.get())
    self.assertEqual(34.0, shot1.sequenceEndFrame.get())
    self.assertEqual(34.0, shot1.duration)
    self.assertEqual(10.0, shot1.startFrame.get())
    self.assertEqual(43.0, shot1.endFrame.get())
    self.assertEqual('/tmp/SEQ001_HSNI_003_0010_v001.mov', shot1.output.get())
    self.assertEqual('0020', shot2.shotName.get())
    self.assertEqual(1024, shot2.wResolution.get())
    self.assertEqual(778, shot2.hResolution.get())
    self.assertEqual(1, shot2.track.get())
    self.assertEqual(35.0, shot2.sequenceStartFrame.get())
    self.assertEqual(65.0, shot2.sequenceEndFrame.get())
    self.assertEqual(31.0, shot2.duration)
    self.assertEqual(10.0, shot2.startFrame.get())
    self.assertEqual(40.0, shot2.endFrame.get())
    self.assertEqual('/tmp/SEQ001_HSNI_003_0020_v001.mov', shot2.output.get())
    self.assertEqual('0030', shot3.shotName.get())
    self.assertEqual(1024, shot3.wResolution.get())
    self.assertEqual(778, shot3.hResolution.get())
    self.assertEqual(1, shot3.track.get())
    self.assertEqual(66.0, shot3.sequenceStartFrame.get())
    self.assertEqual(111.0, shot3.sequenceEndFrame.get())
    self.assertEqual(46.0, shot3.duration)
    self.assertEqual(10.0, shot3.startFrame.get())
    self.assertEqual(55.0, shot3.endFrame.get())
    self.assertEqual('/tmp/SEQ001_HSNI_003_0030_v001.mov', shot3.output.get())
testing if from_xml method will generate Sequences and shots
correctly
def test_from_xml_generates_correct_sequencer_hierarchy(self):
    'testing if from_xml method will generate Sequences and shots\n        correctly\n        '
    path = os.path.abspath('./test_data/test_v001.xml')
    sm = pymel.core.PyNode('sequenceManager1')
    sm.from_xml(path)
    sequences = sm.sequences.get()
    self.assertEqual(len(sequences), 1)
    sequencer = sequences[0]
    self.assertIsInstance(sequencer, pymel.core.nt.Sequencer)
    self.assertEqual(sequencer.duration, 111)
    self.assertEqual(sequencer.sequence_name.get(), 'SEQ001_HSNI_003')
    self.assertEqual(pymel.core.currentUnit(q=1, t=1), 'film')
    time = pymel.core.PyNode('time1')
    self.assertEqual(time.timecodeProductionStart.get(), 0.0)
    shots = sequencer.shots.get()
    self.assertEqual(len(shots), 3)
    shot1 = shots[0]
    shot2 = shots[1]
    shot3 = shots[2]
    self.assertEqual('0010', shot1.shotName.get())
    self.assertEqual(1024, shot1.wResolution.get())
    self.assertEqual(778, shot1.hResolution.get())
    self.assertEqual(1, shot1.track.get())
    self.assertEqual(1.0, shot1.sequenceStartFrame.get())
    self.assertEqual(34.0, shot1.sequenceEndFrame.get())
    self.assertEqual(34.0, shot1.duration)
    self.assertEqual(10.0, shot1.startFrame.get())
    self.assertEqual(43.0, shot1.endFrame.get())
    self.assertEqual('/tmp/SEQ001_HSNI_003_0010_v001.mov', shot1.output.get())
    self.assertEqual('0020', shot2.shotName.get())
    self.assertEqual(1024, shot2.wResolution.get())
    self.assertEqual(778, shot2.hResolution.get())
    self.assertEqual(1, shot2.track.get())
    self.assertEqual(35.0, shot2.sequenceStartFrame.get())
    self.assertEqual(65.0, shot2.sequenceEndFrame.get())
    self.assertEqual(31.0, shot2.duration)
    self.assertEqual(10.0, shot2.startFrame.get())
    self.assertEqual(40.0, shot2.endFrame.get())
    self.assertEqual('/tmp/SEQ001_HSNI_003_0020_v001.mov', shot2.output.get())
    self.assertEqual('0030', shot3.shotName.get())
    self.assertEqual(1024, shot3.wResolution.get())
    self.assertEqual(778, shot3.hResolution.get())
    self.assertEqual(1, shot3.track.get())
    self.assertEqual(66.0, shot3.sequenceStartFrame.get())
    self.assertEqual(111.0, shot3.sequenceEndFrame.get())
    self.assertEqual(46.0, shot3.duration)
    self.assertEqual(10.0, shot3.startFrame.get())
    self.assertEqual(55.0, shot3.endFrame.get())
    self.assertEqual('/tmp/SEQ001_HSNI_003_0030_v001.mov', shot3.output.get())