def test_bokchoy(options): """ Run acceptance tests that use the bok-choy framework. Skips some setup if `fasttest` is True. `test_spec` is a nose-style test specifier relative to the test directory Examples: - path/to/test.py - path/to/test.py:TestFoo - path/to/test.py:TestFoo.test_bar It can also be left blank to run all tests in the suite. """ if getattr(options, 'validate_firefox_version', True): check_firefox_version() opts = { 'test_spec': getattr(options, 'test_spec', None), 'fasttest': getattr(options, 'fasttest', False), 'verbosity': getattr(options, 'verbosity', 2), 'extra_args': getattr(options, 'extra_args', ''), 'test_dir': 'tests', } test_suite = BokChoyTestSuite('bok-choy', **opts) test_suite.run()
def test_bokchoy(options): """ Run acceptance tests that use the bok-choy framework. Skips some setup if `fasttest` is True. `test_spec` is a nose-style test specifier relative to the test directory Examples: - path/to/test.py - path/to/test.py:TestFoo - path/to/test.py:TestFoo.test_bar It can also be left blank to run all tests in the suite. """ if getattr(options, 'validate_firefox_version', True): check_firefox_version() opts = { 'test_spec': getattr(options, 'test_spec', None), 'fasttest': getattr(options, 'fasttest', False), 'verbosity': getattr(options, 'verbosity', 2), 'extra_args': getattr(options, 'extra_args', ''), 'test_dir': 'tests', } test_suite = BokChoyTestSuite('bok-choy', **opts) test_suite.run()
def run_bokchoy(**opts): """ Runs BokChoyTestSuite with the given options. """ test_suite = BokChoyTestSuite('bok-choy', **opts) msg = colorize( 'green', 'Running tests using {default_store} modulestore.'.format( default_store=test_suite.default_store, )) print msg test_suite.run()
def run_bokchoy(options, passthrough_options): """ Runs BokChoyTestSuite with the given options. """ test_suite = BokChoyTestSuite('bok-choy', passthrough_options=passthrough_options, **options) msg = colorize( 'green', u'Running tests using {default_store} modulestore.'.format( default_store=test_suite.default_store, )) print(msg) test_suite.run()
def run_bokchoy(**opts): """ Runs BokChoyTestSuite with the given options. """ test_suite = BokChoyTestSuite('bok-choy', **opts) msg = colorize( 'green', 'Running tests using {default_store} modulestore.'.format( default_store=test_suite.default_store) ) print(msg) test_suite.run()
def run_bokchoy(options, passthrough_options): """ Runs BokChoyTestSuite with the given options. """ test_suite = BokChoyTestSuite('bok-choy', passthrough_options=passthrough_options, **options) msg = colorize( 'green', 'Running tests using {default_store} modulestore.'.format( default_store=test_suite.default_store, ) ) print msg test_suite.run()
def perf_report_bokchoy(options): """ Generates a har file for with page performance info. """ opts = { 'test_spec': getattr(options, 'test_spec', None), 'fasttest': getattr(options, 'fasttest', False), 'imports_dir': getattr(options, 'imports_dir', None), 'verbosity': getattr(options, 'verbosity', 2), 'test_dir': 'performance', 'ptests': True, } test_suite = BokChoyTestSuite('bok-choy', **opts) test_suite.run()
def perf_report_bokchoy(options): """ Generates a har file for with page performance info. """ opts = { 'test_spec': getattr(options, 'test_spec', None), 'fasttest': getattr(options, 'fasttest', False), 'imports_dir': getattr(options, 'imports_dir', None), 'verbosity': getattr(options, 'verbosity', 2), 'test_dir': 'performance', 'ptests': True, } test_suite = BokChoyTestSuite('bok-choy', **opts) test_suite.run()
def run_bokchoy(**opts): """ Runs BokChoyTestSuite with the given options. If a default store is not specified, runs the test suite for 'split' as the default store. """ if opts['default_store'] not in ['draft', 'split']: msg = colorize('red', 'No modulestore specified, running tests for split.') print(msg) stores = ['split'] else: stores = [opts['default_store']] for store in stores: opts['default_store'] = store test_suite = BokChoyTestSuite('bok-choy', **opts) test_suite.run()
def run_bokchoy(**opts): """ Runs BokChoyTestSuite with the given options. If a default store is not specified, runs the test suite for 'split' as the default store. """ if opts['default_store'] not in ['draft', 'split']: msg = colorize( 'red', 'No modulestore specified, running tests for split.' ) print(msg) stores = ['split'] else: stores = [opts['default_store']] for store in stores: opts['default_store'] = store test_suite = BokChoyTestSuite('bok-choy', **opts) test_suite.run()
def setUp(self): self.request = BokChoyTestSuite('')