def test_optimize_clips_is_working_properly(self):
        t = Track()
        t.enabled = True
        t.locked = False

        # clip 1
        f = File()
        f.duration = 34
        f.name = 'shot2'
        f.pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot2.mov'

        c = Clip()
        c.id = 'shot2'
        c.start = 1
        c.end = 35
        c.name = 'shot2'
        c.enabled = True
        c.duration = 34
        c.in_ = 0
        c.out = 34
        c.file = f

        t.clips.append(c)

        # clip 2
        f = File()
        f.duration = 30
        f.name = 'shot'
        f.pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot2.mov'

        c = Clip()
        c.id = 'shot'
        c.start = 35
        c.end = 65
        c.name = 'shot'
        c.enabled = True
        c.duration = 30
        c.in_ = 0
        c.out = 30
        c.file = f

        t.clips.append(c)

        # clip 3
        f = File()
        f.duration = 45
        f.name = 'shot1'
        f.pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot1.mov'

        c = Clip()
        c.id = 'shot1'
        c.start = 65
        c.end = 110
        c.name = 'shot1'
        c.enabled = True
        c.duration = 45
        c.in_ = 0
        c.out = 45
        c.file = f

        t.clips.append(c)

        # check if the file objects are different
        self.assertNotEqual(t.clips[0].file, t.clips[1].file)
        self.assertNotEqual(t.clips[0].file, t.clips[2].file)
        self.assertNotEqual(t.clips[1].file, t.clips[2].file)

        # now optimize the clips
        t.optimize_clips()

        # check if the file[0] and file[1] is the same file node
        # and the file[2] is different than the others
        self.assertEqual(t.clips[0].file, t.clips[1].file)
        self.assertNotEqual(t.clips[0].file, t.clips[2].file)
        self.assertNotEqual(t.clips[1].file, t.clips[2].file)
testing if the optimize_clips method will optimize the clips to use
dataset/ETHPy150Open eoyilmaz/anima/tests/previs/test_track.py/TrackTestCase.test_optimize_clips_is_working_properly