Commit 2983b3da by Calen Pennington

Correctly pass bok-choy specific options through to the BokChoyTestSuite

parent ea28eb61
...@@ -47,7 +47,7 @@ def test_bokchoy(options, passthrough_options): ...@@ -47,7 +47,7 @@ def test_bokchoy(options, passthrough_options):
if validate_firefox: if validate_firefox:
check_firefox_version() check_firefox_version()
run_bokchoy(passthrough_options=passthrough_options, **options) run_bokchoy(options.test_bokchoy, passthrough_options)
@needs('pavelib.prereqs.install_prereqs') @needs('pavelib.prereqs.install_prereqs')
...@@ -72,10 +72,10 @@ def test_a11y(options, passthrough_options): ...@@ -72,10 +72,10 @@ def test_a11y(options, passthrough_options):
""" """
# Modify the options object directly, so that any subsequently called tasks # Modify the options object directly, so that any subsequently called tasks
# that share with this task get the modified options # that share with this task get the modified options
options['test_a11y']['report_dir'] = Env.BOK_CHOY_A11Y_REPORT_DIR options.test_a11y.report_dir = Env.BOK_CHOY_A11Y_REPORT_DIR
options['test_a11y']['coveragerc'] = Env.BOK_CHOY_A11Y_COVERAGERC options.test_a11y.coveragerc = Env.BOK_CHOY_A11Y_COVERAGERC
options['test_a11y']['extra_args'] = options.get('extra_args', '') + ' -a "a11y" ' options.test_a11y.extra_args = options.get('extra_args', '') + ' -a "a11y" '
run_bokchoy(passthrough_options=passthrough_options, **options['test_a11y']) run_bokchoy(options.test_a11y, passthrough_options)
@needs('pavelib.prereqs.install_prereqs') @needs('pavelib.prereqs.install_prereqs')
...@@ -88,9 +88,9 @@ def perf_report_bokchoy(options, passthrough_options): ...@@ -88,9 +88,9 @@ def perf_report_bokchoy(options, passthrough_options):
""" """
# Modify the options object directly, so that any subsequently called tasks # Modify the options object directly, so that any subsequently called tasks
# that share with this task get the modified options # 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') @needs('pavelib.prereqs.install_prereqs')
...@@ -117,26 +117,26 @@ def pa11ycrawler(options, passthrough_options): ...@@ -117,26 +117,26 @@ def pa11ycrawler(options, passthrough_options):
""" """
# Modify the options object directly, so that any subsequently called tasks # Modify the options object directly, so that any subsequently called tasks
# that share with this task get the modified options # that share with this task get the modified options
options['pa11ycrawler']['report_dir'] = Env.PA11YCRAWLER_REPORT_DIR options.pa11ycrawler.report_dir = Env.PA11YCRAWLER_REPORT_DIR
options['pa11ycrawler']['coveragerc'] = Env.PA11YCRAWLER_COVERAGERC options.pa11ycrawler.coveragerc = Env.PA11YCRAWLER_COVERAGERC
options['pa11ycrawler']['should_fetch_course'] = getattr( options.pa11ycrawler.should_fetch_course = getattr(
options, options,
'should_fetch_course', 'should_fetch_course',
not options.get('fasttest') not options.get('fasttest')
) )
options['pa11ycrawler']['course_key'] = getattr(options, 'course-key', "course-v1:edX+Test101+course") 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 = Pa11yCrawler('a11y_crawler', passthrough_options=passthrough_options, **options.pa11ycrawler)
test_suite.run() test_suite.run()
if getattr(options, 'with_html', False): if getattr(options, 'with_html', False):
test_suite.generate_html_reports() test_suite.generate_html_reports()
def run_bokchoy(**opts): def run_bokchoy(options, passthrough_options):
""" """
Runs BokChoyTestSuite with the given 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( msg = colorize(
'green', 'green',
'Running tests using {default_store} modulestore.'.format( 'Running tests using {default_store} modulestore.'.format(
......
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