Skip to content

Commit

Permalink
unittest work again
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Fiers committed Sep 13, 2012
1 parent 5417ccd commit 656bca5
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions test/test_templates.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
import random
import unittest2 as unittest
import unittest
import doctest

import moa.job
import moa.plugin
import moa.template

## Initialize the logger
import moa.logger
l = moa.logger.getLogger(__name__)

import moa.backend.ruff.test
#import moa.backend.gnumake.test


from moa.sysConf import sysConf
sysConf.initialize()
sysConf.pluginHandler = moa.plugin.PluginHandler(sysConf.plugins.system)


def load_tests(loader, tests, ignore):
tests.addTests(templateTestSuite())
return tests


def templateTestSuite():
suite = unittest.TestSuite()
for template in moa.template.templateList():
job = moa.job.newTestJob(template)
for provider, template in moa.template.templateList():
job = moa.job.newTestJob(template, provider=provider)
if job.template.backend == 'ruff':
continue

#tester = moa.backend.ruff.test.templateTest()
#tester.setJob(job)
#suite.addTest(tester)

test = moa.backend.ruff.test.templateTest(job)
suite.addTest(test)
return suite

if __name__ == '__main__':
unittest.main()

0 comments on commit 656bca5

Please sign in to comment.