本文整理汇总了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)
示例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)
示例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)
示例4: test_xlint_fails
def test_xlint_fails(self):
err_cnt = perform_xlint('common/test/data', ['full'])
self.assertGreater(err_cnt, 0)