From 2983b3da5f1bc8d1300c93773644af00706ee6d3 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Tue, 26 Jul 2016 15:26:16 -0400 Subject: [PATCH] Correctly pass bok-choy specific options through to the BokChoyTestSuite --- pavelib/bok_choy.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/pavelib/bok_choy.py b/pavelib/bok_choy.py index 6ceb1c1dd7..8559bfc139 100644 --- a/pavelib/bok_choy.py +++ b/pavelib/bok_choy.py @@ -47,7 +47,7 @@ def test_bokchoy(options, passthrough_options): if validate_firefox: check_firefox_version() - run_bokchoy(passthrough_options=passthrough_options, **options) + run_bokchoy(options.test_bokchoy, passthrough_options) @needs('pavelib.prereqs.install_prereqs') @@ -72,10 +72,10 @@ def test_a11y(options, passthrough_options): """ # Modify the options object directly, so that any subsequently called tasks # that share with this task get the modified options - options['test_a11y']['report_dir'] = Env.BOK_CHOY_A11Y_REPORT_DIR - options['test_a11y']['coveragerc'] = Env.BOK_CHOY_A11Y_COVERAGERC - options['test_a11y']['extra_args'] = options.get('extra_args', '') + ' -a "a11y" ' - run_bokchoy(passthrough_options=passthrough_options, **options['test_a11y']) + options.test_a11y.report_dir = Env.BOK_CHOY_A11Y_REPORT_DIR + options.test_a11y.coveragerc = Env.BOK_CHOY_A11Y_COVERAGERC + options.test_a11y.extra_args = options.get('extra_args', '') + ' -a "a11y" ' + run_bokchoy(options.test_a11y, passthrough_options) @needs('pavelib.prereqs.install_prereqs') @@ -88,9 +88,9 @@ def perf_report_bokchoy(options, passthrough_options): """ # Modify the options object directly, so that any subsequently called tasks # that share with this task get the modified options - options['perf_report_bokchoy']['test_dir'] = 'performance' + options.perf_report_bokchoy.test_dir = 'performance' - run_bokchoy(passthrough_options=passthrough_options, **options['perf_report_bokchoy']) + run_bokchoy(options.perf_report_bokchoy, passthrough_options) @needs('pavelib.prereqs.install_prereqs') @@ -117,26 +117,26 @@ def pa11ycrawler(options, passthrough_options): """ # Modify the options object directly, so that any subsequently called tasks # that share with this task get the modified options - options['pa11ycrawler']['report_dir'] = Env.PA11YCRAWLER_REPORT_DIR - options['pa11ycrawler']['coveragerc'] = Env.PA11YCRAWLER_COVERAGERC - options['pa11ycrawler']['should_fetch_course'] = getattr( + options.pa11ycrawler.report_dir = Env.PA11YCRAWLER_REPORT_DIR + options.pa11ycrawler.coveragerc = Env.PA11YCRAWLER_COVERAGERC + options.pa11ycrawler.should_fetch_course = getattr( options, 'should_fetch_course', not options.get('fasttest') ) - options['pa11ycrawler']['course_key'] = getattr(options, 'course-key', "course-v1:edX+Test101+course") - test_suite = Pa11yCrawler('a11y_crawler', passthrough_options=passthrough_options, **options['pa11ycrawler']) + options.pa11ycrawler.course_key = getattr(options, 'course-key', "course-v1:edX+Test101+course") + test_suite = Pa11yCrawler('a11y_crawler', passthrough_options=passthrough_options, **options.pa11ycrawler) test_suite.run() if getattr(options, 'with_html', False): test_suite.generate_html_reports() -def run_bokchoy(**opts): +def run_bokchoy(options, passthrough_options): """ Runs BokChoyTestSuite with the given options. """ - test_suite = BokChoyTestSuite('bok-choy', **opts) + test_suite = BokChoyTestSuite('bok-choy', passthrough_options=passthrough_options, **options) msg = colorize( 'green', 'Running tests using {default_store} modulestore.'.format(