Exemple #1
0
    def test_create_comments(self):
        test_file = os.path.join(sandbox, 'comments_create.aaf')
        f = aaf.open(test_file, 'w')

        header = f.header
        d = f.dictionary

        mob = d.create.MasterMob("bob")
        f.storage.add_mob(mob)

        d = {'comment1':'value1', 'comment2': "value2", 'comment3':"value3"}
        for key, value in d.items():
            mob.append_comment(key,value)

        for item in mob.comments():
            print('**', item.name, item.value)
            assert d[item.name] == item.value

        mob.remove_comment_by_name('comment3')

        for item in mob.comments():
            assert item.name != 'comment3'

        f.save()
        f.close()
Exemple #2
0
    def test_create_comments(self):
        test_file = os.path.join(sandbox, 'comments_create.aaf')
        f = aaf.open(test_file, 'w')

        header = f.header
        d = f.dictionary

        mob = d.create.MasterMob("bob")
        f.storage.add_mob(mob)

        d = {'comment1': 'value1', 'comment2': "value2", 'comment3': "value3"}
        for key, value in d.items():
            mob.append_comment(key, value)

        for item in mob.comments():
            print '**', item.name, item.value
            assert d[item.name] == item.value.value

        mob.remove_comment_by_name('comment3')

        for item in mob.comments():
            assert item.name != 'comment3'

        f.save()
        f.close()
Exemple #3
0
    def test_comments(self):
        test_file = main_test_file
        f = aaf.open(test_file)
        header = f.header
        storage = f.storage

        for mob in storage.mobs():

            comments = list(mob.comments())
            if comments:
                print(mob.name)
                for c in comments:
                    print('  ', c.name, c.value)
Exemple #4
0
    def test_comments(self):
        test_file = main_test_file
        f = aaf.open(test_file)
        header = f.header
        storage = f.storage

        for mob in storage.mobs():

            comments = list(mob.comments())
            if comments:
                print mob.name
                for c in comments:
                    print '  ', c.name, c.value