Moved test_generate from i18n-tools
This commit is contained in:
@@ -125,19 +125,6 @@ def test_python(options):
|
||||
python_suite.run()
|
||||
|
||||
|
||||
@task
|
||||
@needs(
|
||||
'pavelib.prereqs.install_python_prereqs',
|
||||
'pavelib.utils.test.utils.clean_reports_dir',
|
||||
)
|
||||
def test_i18n():
|
||||
"""
|
||||
Run all i18n tests
|
||||
"""
|
||||
i18n_suite = suites.I18nTestSuite('i18n')
|
||||
i18n_suite.run()
|
||||
|
||||
|
||||
@task
|
||||
@needs(
|
||||
'pavelib.prereqs.install_prereqs',
|
||||
@@ -157,11 +144,10 @@ def test(options):
|
||||
}
|
||||
# Subsuites to be added to the main suite
|
||||
python_suite = suites.PythonTestSuite('Python Tests', **opts)
|
||||
i18n_suite = suites.I18nTestSuite('i18n', **opts)
|
||||
js_suite = suites.JsTestSuite('JS Tests', mode='run', with_coverage=True)
|
||||
|
||||
# Main suite to be run
|
||||
all_unittests_suite = suites.TestSuite('All Tests', subsuites=[i18n_suite, js_suite, python_suite])
|
||||
all_unittests_suite = suites.TestSuite('All Tests', subsuites=[js_suite, python_suite])
|
||||
all_unittests_suite.run()
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user