Пример #1
0
    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
0
    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
0
    def handle(self, *args, **options):
        "Execute the command"
        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)
Пример #4
0
 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)
Пример #5
0
 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)
Пример #6
0
 def test_xlint_fails(self):
     err_cnt = perform_xlint('common/test/data', ['full'])
     self.assertGreater(err_cnt, 0)
 def test_xlint_fails(self):
     err_cnt = perform_xlint("common/test/data", ["full"])
     self.assertGreater(err_cnt, 0)