def test_generate_sequence_structure_is_working_properly(self):
    'testing if generate_sequence_structure() method is working properly\n        '
    sm = pymel.core.PyNode('sequenceManager1')
    from anima.env import mayaEnv
    mayaEnv.Maya.set_fps(fps=24)
    sm.set_shot_name_template('<Sequence>_<Shot>_<Version>')
    sm.set_version('v001')
    seq1 = sm.create_sequence('SEQ001_HSNI_003')
    shot1 = seq1.create_shot('0010')
    shot1.startFrame.set(0)
    shot1.endFrame.set(24)
    shot1.sequenceStartFrame.set(0)
    shot1.track.set(1)
    shot1.output.set('/tmp/SEQ001_HSNI_003_0010_v001.mov')
    shot1.handle.set(10)
    shot2 = seq1.create_shot('0020')
    shot2.startFrame.set(10)
    shot2.endFrame.set(35)
    shot2.sequenceStartFrame.set(25)
    shot2.track.set(1)
    shot2.output.set('/tmp/SEQ001_HSNI_003_0020_v001.mov')
    shot2.handle.set(15)
    shot3 = seq1.create_shot('0030')
    shot3.startFrame.set(25)
    shot3.endFrame.set(50)
    shot3.sequenceStartFrame.set(45)
    shot3.track.set(2)
    shot3.output.set('/tmp/SEQ001_HSNI_003_0030_v001.mov')
    shot3.handle.set(20)
    seq = sm.generate_sequence_structure()
    self.assertIsInstance(seq, Sequence)
    rate = seq.rate
    self.assertEqual('24', rate.timebase)
    self.assertEqual(False, rate.ntsc)
    self.assertEqual('00:00:00:00', seq.timecode)
    self.assertEqual(False, seq.ntsc)
    media = seq.media
    self.assertIsInstance(media, Media)
    video = media.video
    self.assertIsInstance(video, Video)
    self.assertIsNone(media.audio)
    self.assertEqual(2, len(video.tracks))
    track1 = video.tracks[0]
    self.assertIsInstance(track1, Track)
    self.assertEqual(len(track1.clips), 2)
    self.assertEqual(track1.enabled, True)
    track2 = video.tracks[1]
    self.assertIsInstance(track2, Track)
    self.assertEqual(len(track2.clips), 1)
    self.assertEqual(track2.enabled, True)
    clip1 = track1.clips[0]
    self.assertIsInstance(clip1, Clip)
    self.assertEqual('Video', clip1.type)
    self.assertEqual('SEQ001_HSNI_003_0010_v001', clip1.id)
    self.assertEqual('SEQ001_HSNI_003_0010_v001', clip1.name)
    self.assertEqual(10, clip1.in_)
    self.assertEqual(35, clip1.out)
    self.assertEqual(0, clip1.start)
    self.assertEqual(25, clip1.end)
    clip2 = track1.clips[1]
    self.assertIsInstance(clip2, Clip)
    self.assertEqual('Video', clip2.type)
    self.assertEqual('SEQ001_HSNI_003_0020_v001', clip2.id)
    self.assertEqual('SEQ001_HSNI_003_0020_v001', clip2.name)
    self.assertEqual(15, clip2.in_)
    self.assertEqual(41, clip2.out)
    self.assertEqual(25, clip2.start)
    self.assertEqual(51, clip2.end)
    clip3 = track2.clips[0]
    self.assertIsInstance(clip3, Clip)
    self.assertEqual('Video', clip3.type)
    self.assertEqual('SEQ001_HSNI_003_0030_v001', clip3.id)
    self.assertEqual('SEQ001_HSNI_003_0030_v001', clip3.name)
    self.assertEqual(20, clip3.in_)
    self.assertEqual(46, clip3.out)
    self.assertEqual(45, clip3.start)
    self.assertEqual(71, clip3.end)
    file1 = clip1.file
    self.assertIsInstance(file1, File)
    self.assertEqual('SEQ001_HSNI_003_0010_v001', file1.name)
    self.assertEqual('file://localhost/tmp/SEQ001_HSNI_003_0010_v001.mov', file1.pathurl)
    self.assertEqual(45, file1.duration)
    file2 = clip2.file
    self.assertIsInstance(file2, File)
    self.assertEqual('SEQ001_HSNI_003_0020_v001', file2.name)
    self.assertEqual('file://localhost/tmp/SEQ001_HSNI_003_0020_v001.mov', file2.pathurl)
    self.assertEqual(56, file2.duration)
    file3 = clip3.file
    self.assertIsInstance(file3, File)
    self.assertEqual('SEQ001_HSNI_003_0030_v001', file3.name)
    self.assertEqual('file://localhost/tmp/SEQ001_HSNI_003_0030_v001.mov', file3.pathurl)
    self.assertEqual(66, file3.duration)
testing if generate_sequence_structure() method is working properly
def test_generate_sequence_structure_is_working_properly(self):
    '\n        '
    sm = pymel.core.PyNode('sequenceManager1')
    from anima.env import mayaEnv
    mayaEnv.Maya.set_fps(fps=24)
    sm.set_shot_name_template('<Sequence>_<Shot>_<Version>')
    sm.set_version('v001')
    seq1 = sm.create_sequence('SEQ001_HSNI_003')
    shot1 = seq1.create_shot('0010')
    shot1.startFrame.set(0)
    shot1.endFrame.set(24)
    shot1.sequenceStartFrame.set(0)
    shot1.track.set(1)
    shot1.output.set('/tmp/SEQ001_HSNI_003_0010_v001.mov')
    shot1.handle.set(10)
    shot2 = seq1.create_shot('0020')
    shot2.startFrame.set(10)
    shot2.endFrame.set(35)
    shot2.sequenceStartFrame.set(25)
    shot2.track.set(1)
    shot2.output.set('/tmp/SEQ001_HSNI_003_0020_v001.mov')
    shot2.handle.set(15)
    shot3 = seq1.create_shot('0030')
    shot3.startFrame.set(25)
    shot3.endFrame.set(50)
    shot3.sequenceStartFrame.set(45)
    shot3.track.set(2)
    shot3.output.set('/tmp/SEQ001_HSNI_003_0030_v001.mov')
    shot3.handle.set(20)
    seq = sm.generate_sequence_structure()
    self.assertIsInstance(seq, Sequence)
    rate = seq.rate
    self.assertEqual('24', rate.timebase)
    self.assertEqual(False, rate.ntsc)
    self.assertEqual('00:00:00:00', seq.timecode)
    self.assertEqual(False, seq.ntsc)
    media = seq.media
    self.assertIsInstance(media, Media)
    video = media.video
    self.assertIsInstance(video, Video)
    self.assertIsNone(media.audio)
    self.assertEqual(2, len(video.tracks))
    track1 = video.tracks[0]
    self.assertIsInstance(track1, Track)
    self.assertEqual(len(track1.clips), 2)
    self.assertEqual(track1.enabled, True)
    track2 = video.tracks[1]
    self.assertIsInstance(track2, Track)
    self.assertEqual(len(track2.clips), 1)
    self.assertEqual(track2.enabled, True)
    clip1 = track1.clips[0]
    self.assertIsInstance(clip1, Clip)
    self.assertEqual('Video', clip1.type)
    self.assertEqual('SEQ001_HSNI_003_0010_v001', clip1.id)
    self.assertEqual('SEQ001_HSNI_003_0010_v001', clip1.name)
    self.assertEqual(10, clip1.in_)
    self.assertEqual(35, clip1.out)
    self.assertEqual(0, clip1.start)
    self.assertEqual(25, clip1.end)
    clip2 = track1.clips[1]
    self.assertIsInstance(clip2, Clip)
    self.assertEqual('Video', clip2.type)
    self.assertEqual('SEQ001_HSNI_003_0020_v001', clip2.id)
    self.assertEqual('SEQ001_HSNI_003_0020_v001', clip2.name)
    self.assertEqual(15, clip2.in_)
    self.assertEqual(41, clip2.out)
    self.assertEqual(25, clip2.start)
    self.assertEqual(51, clip2.end)
    clip3 = track2.clips[0]
    self.assertIsInstance(clip3, Clip)
    self.assertEqual('Video', clip3.type)
    self.assertEqual('SEQ001_HSNI_003_0030_v001', clip3.id)
    self.assertEqual('SEQ001_HSNI_003_0030_v001', clip3.name)
    self.assertEqual(20, clip3.in_)
    self.assertEqual(46, clip3.out)
    self.assertEqual(45, clip3.start)
    self.assertEqual(71, clip3.end)
    file1 = clip1.file
    self.assertIsInstance(file1, File)
    self.assertEqual('SEQ001_HSNI_003_0010_v001', file1.name)
    self.assertEqual('file://localhost/tmp/SEQ001_HSNI_003_0010_v001.mov', file1.pathurl)
    self.assertEqual(45, file1.duration)
    file2 = clip2.file
    self.assertIsInstance(file2, File)
    self.assertEqual('SEQ001_HSNI_003_0020_v001', file2.name)
    self.assertEqual('file://localhost/tmp/SEQ001_HSNI_003_0020_v001.mov', file2.pathurl)
    self.assertEqual(56, file2.duration)
    file3 = clip3.file
    self.assertIsInstance(file3, File)
    self.assertEqual('SEQ001_HSNI_003_0030_v001', file3.name)
    self.assertEqual('file://localhost/tmp/SEQ001_HSNI_003_0030_v001.mov', file3.pathurl)
    self.assertEqual(66, file3.duration)