当前位置: 首页>>代码示例>>Python>>正文


Python xml_importer.perform_xlint函数代码示例

本文整理汇总了Python中xmodule.modulestore.xml_importer.perform_xlint函数的典型用法代码示例。如果您正苦于以下问题:Python perform_xlint函数的具体用法?Python perform_xlint怎么用?Python perform_xlint使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了perform_xlint函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: handle

    def handle(self, *args, **options):
        """Execute the command"""

        data_dir = options['data_dir']
        source_dirs = options['source_dirs']

        print(u"Importing.  Data_dir={data}, source_dirs={courses}".format(
            data=data_dir,
            courses=source_dirs))

        perform_xlint(data_dir, source_dirs, load_error_modules=False)
开发者ID:cpennington,项目名称:edx-platform,代码行数:11,代码来源:xlint.py

示例2: handle

    def handle(self, *args, **options):
        if len(args) == 0:
            raise CommandError("import requires at least one argument: <data directory> [<course dir>...]")

        data_dir = args[0]
        if len(args) > 1:
            course_dirs = args[1:]
        else:
            course_dirs = None
        print "Importing.  Data_dir={data}, course_dirs={courses}".format(
            data=data_dir,
            courses=course_dirs)
        perform_xlint(data_dir, course_dirs, load_error_modules=False)
开发者ID:2bj,项目名称:edx-platform,代码行数:13,代码来源:xlint.py

示例3: test_xlinter

 def test_xlinter(self):
     '''
     Run through the xlinter, we know the 'toy' course has violations, but the
     number will continue to grow over time, so just check > 0
     '''
     assert_not_equals(perform_xlint(DATA_DIR, ['toy']), 0)
开发者ID:CEIT-UQ,项目名称:edx-platform,代码行数:6,代码来源:test_mongo.py

示例4: test_xlint_fails

 def test_xlint_fails(self):
     err_cnt = perform_xlint('common/test/data', ['full'])
     self.assertGreater(err_cnt, 0)
开发者ID:nettoyeur,项目名称:edx-platform,代码行数:3,代码来源:test_contentstore.py


注:本文中的xmodule.modulestore.xml_importer.perform_xlint函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。