def main(): c = config.Config(stream=sys.stdout, env=os.environ, verbosity=3, includeExe=True, traverseNamespace=True) c.configureWhere(quantum.tests.unit.__path__) sys.exit(run_tests(c))
def main(): c = config.Config(stream=sys.stdout, env=os.environ, verbosity=3, includeExe=True, traverseNamespace=True, plugins=core.DefaultPluginManager()) c.configureWhere(quantum.tests.unit.__path__) sys.exit(run_tests(c))
def main(): c = config.Config(stream=sys.stdout, env=os.environ, verbosity=3, includeExe=True, traverseNamespace=True, plugins=core.DefaultPluginManager()) c.configureWhere(quantum.plugins.cisco.tests.unit.__path__) sys.exit(run_tests(c))
def main(): test_config['plugin_name'] = "l2network_plugin.L2Network" cwd = os.getcwd() os.chdir(cwd) working_dir = os.path.abspath("quantum/plugins/cisco") c = config.Config(stream=sys.stdout, env=os.environ, verbosity=3, workingDir=working_dir) sys.exit(run_tests(c))
# we should only invoked the tests once invoke_once = len(sys.argv) > 1 test_config['plugin_name'] = "LinuxBridgePlugin.LinuxBridgePlugin" test_config['default_net_op_status'] = OperationalStatus.UP test_config['default_port_op_status'] = OperationalStatus.DOWN cwd = os.getcwd() c = config.Config(stream=sys.stdout, env=os.environ, verbosity=3, includeExe=True, traverseNamespace=True, plugins=core.DefaultPluginManager()) c.configureWhere(quantum.tests.unit.__path__) exit_status = run_tests(c) if invoke_once: sys.exit(0) os.chdir(cwd) working_dir = os.path.abspath("quantum/plugins/linuxbridge") c = config.Config(stream=sys.stdout, env=os.environ, verbosity=3, workingDir=working_dir) exit_status = exit_status or run_tests(c) sys.exit(exit_status)
import os import sys from nose import config from nose import core sys.path.append(os.getcwd()) sys.path.append(os.path.dirname(__file__)) from quantum.common.test_lib import run_tests, test_config if __name__ == '__main__': exit_status = False # if a single test case was specified, # we should only invoked the tests once invoke_once = len(sys.argv) > 1 test_config['plugin_name'] = "meta_quantum_plugin.MetaPluginV2" cwd = os.getcwd() working_dir = os.path.abspath("quantum/plugins/metaplugin") c = config.Config(stream=sys.stdout, env=os.environ, verbosity=3, workingDir=working_dir) exit_status = exit_status or run_tests(c) sys.exit(exit_status)
To run a single unit test:: python run_tests.py unit.test_stores:TestSwiftBackend.test_get To run a single functional test:: python run_tests.py functional.test_service:TestController.test_create To run a single unit test module:: python run_tests.py unit.test_stores To run a single functional test module:: python run_tests.py functional.test_stores """ import gettext import os import unittest import sys from quantum.common.test_lib import run_tests from nose import config if __name__ == '__main__': working_dir = os.path.abspath("tests") c = config.Config(stream=sys.stdout, env=os.environ, verbosity=3, workingDir=working_dir) sys.exit(run_tests(c))