Moved test_generate from i18n-tools

This commit is contained in:
Dave St.Germain
2014-06-10 11:50:59 -04:00
parent e6ec664ac0
commit 834c2c472f
5 changed files with 99 additions and 61 deletions

View File

@@ -5,4 +5,3 @@ from .suite import TestSuite
from .nose_suite import NoseTestSuite, SystemTestSuite, LibTestSuite
from .python_suite import PythonTestSuite
from .js_suite import JsTestSuite
from .i18n_suite import I18nTestSuite

View File

@@ -1,42 +0,0 @@
"""
Classes used for defining and running i18n test suites
"""
from pavelib.utils.test.suites import TestSuite
from pavelib.utils.envs import Env
__test__ = False # do not collect
class I18nTestSuite(TestSuite):
"""
Run tests for the internationalization library
"""
def __init__(self, *args, **kwargs):
super(I18nTestSuite, self).__init__(*args, **kwargs)
self.report_dir = Env.I18N_REPORT_DIR
self.xunit_report = self.report_dir / 'nosetests.xml'
def __enter__(self):
super(I18nTestSuite, self).__enter__()
self.report_dir.makedirs_p()
@property
def cmd(self):
pythonpath_prefix = (
"PYTHONPATH={repo_root}/i18n:$PYTHONPATH".format(
repo_root=Env.REPO_ROOT
)
)
cmd = (
"{pythonpath_prefix} nosetests {repo_root}/i18n/tests "
"--with-xunit --xunit-file={xunit_report} "
"--verbosity={verbosity}".format(
pythonpath_prefix=pythonpath_prefix,
repo_root=Env.REPO_ROOT,
xunit_report=self.xunit_report,
verbosity=self.verbosity,
)
)
return cmd