Commit b0e1701e authored by payno's avatar payno

remove test_options

parent 9f51ae1b
......@@ -327,20 +327,6 @@ def import_project_module(project_name, project_dir):
return module
def get_test_options(project_module):
"""Returns the test options if available, else None"""
module_name = project_module.__name__ + '.test.utils'
logger.info('Import %s', module_name)
try:
test_utils = importer(module_name)
except ImportError:
logger.warning("No module named '%s'. No test options available.", module_name)
return None
test_options = getattr(test_utils, "test_options", None)
return test_options
if __name__ == "__main__": # Needed for multiprocessing support on Windows
PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
PROJECT_NAME = get_project_name(PROJECT_DIR)
......@@ -350,12 +336,6 @@ if __name__ == "__main__": # Needed for multiprocessing support on Windows
PROJECT_VERSION = getattr(project_module, 'version', '')
PROJECT_PATH = project_module.__path__[0]
test_options = get_test_options(project_module)
"""Contains extra configuration for the tests."""
parser = ArgumentParser(description='Run the tests.')
parser.add_argument("--installed",
......@@ -369,8 +349,6 @@ if __name__ == "__main__": # Needed for multiprocessing support on Windows
"including debug messages and test help strings.")
parser.add_argument("--qt-binding", dest="qt_binding", default=None,
help="Force using a Qt binding, from 'PyQt4', 'PyQt5', or 'PySide'")
if test_options is not None:
test_options.add_parser_argument(parser)
default_test_name = "%s.test.suite" % PROJECT_NAME
parser.add_argument("test_name", nargs='*',
......@@ -431,13 +409,6 @@ if __name__ == "__main__": # Needed for multiprocessing support on Windows
test_module = importer(test_module_name)
test_suite = unittest.TestSuite()
if test_options is not None:
# Configure the test options according to the command lines and the the environment
test_options.configure(options)
else:
logger.warning("No test options available.")
if not options.test_name:
# Do not use test loader to avoid cryptic exception
# when an error occur during import
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment