Beispiel #1
0
        if product not in pot_catalogs:
            cat = catalog.MessageCatalog(filename=potFile)
            cat_len = len(cat)
            pots.update({product: potFile})
            pot_catalogs.update({product: cat})
            pot_lens.update({product: cat_len})

    for product in products:

        class TestOnePOT(PotTestCase.PotTestCase):
            product = product
            pot = pots[product]

        tests.append(TestOnePOT)

        for poFile in getPoFiles(path=i18ndir, product=product):

            class TestOnePoFile(PoTestCase.PoTestCase):
                po = poFile
                product = product
                pot_cat = pot_catalogs[product]
                pot_len = pot_lens[product]

            tests.append(TestOnePoFile)

import unittest


def test_suite():
    suite = unittest.TestSuite()
    for test in tests:
    if product not in products:
        products.append(product)
    if product not in pot_catalogs:
        cat = catalog.MessageCatalog(filename=potFile)
        cat_len = len(cat)
        pots.update({product: potFile})
        pot_catalogs.update({product: cat})
        pot_lens.update({product: cat_len})

for product in products:
    class TestOnePOT(PotTestCase.PotTestCase):
        product = product
        pot = pots[product]
    tests.append(TestOnePOT)

    for poFile in getPoFiles(path=i18ndir, product=product):
        class TestOnePoFile(PoTestCase.PoTestCase):
            po = poFile
            product = product
            pot_cat = pot_catalogs[product]
            pot_len = pot_lens[product]
        tests.append(TestOnePoFile)

    import unittest
    def test_suite():
        suite = unittest.TestSuite()
        for test in tests:
            suite.addTest(unittest.makeSuite(test))
        return suite

if __name__ == '__main__':