@needs('pavelib.prereqs.install_prereqs', 'get_test_course')
@cmdopts((BOKCHOY_OPTS + [PA11Y_HTML, PA11Y_COURSE_KEY, PA11Y_FETCH_COURSE]), share_with=['get_test_course', 'prepare_bokchoy_run', 'load_courses'])
@PassthroughTask
@timed
def pa11ycrawler(options, passthrough_options):
 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('pa11ycrawler', passthrough_options=passthrough_options, **options.pa11ycrawler)
 test_suite.run()
 if getattr(options, 'with_html', False):
  test_suite.generate_html_reports()

@ needs ( 'pavelib.prereqs.install_prereqs' , 'get_test_course' ) @ cmdopts ( ( BOKCHOY_OPTS + [ PA11Y_HTML , PA11Y_COURSE_KEY , PA11Y_FETCH_COURSE ] ) , share_with = [ 'get_test_course' , 'prepare_bokchoy_run' , 'load_courses' ] ) @ PassthroughTask @ timed def pa11ycrawler ( options , passthrough_options ) : 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 ( 'pa11ycrawler' , passthrough_options = passthrough_options , ** options . pa11ycrawler ) test_suite . run ( ) if getattr ( options , 'with_html' , False ) : test_suite . generate_html_reports ( )
runs pa11ycrawler against the demo-test-course to generates accessibility reports .