Commit adb3627a authored by Matthieu Boileau's avatar Matthieu Boileau
Browse files

Handle doit task errors

parent c0bad7aa
Pipeline #5775 passed with stage
in 32 seconds
......@@ -390,5 +390,5 @@ class NbCourse:
if args is None:
args = []
doit_config = {} # TODO: implement verbosity option
sys.exit(MyDoitMain(ClassTaskLoader(self),
extra_config=doit_config).run(args))
return MyDoitMain(ClassTaskLoader(self),
extra_config=doit_config).run(args)
......@@ -33,18 +33,16 @@ def test_minimal_nbcourse(create_project):
def test_minimal_nbcourse_build(create_project, task):
"""test nbcourse on list of doit tasks returned by get_functions"""
course = NbCourse(MINI_CONF)
with pytest.raises(SystemExit):
course.build(["-n 4", task])
assert course.build(["-n 4", task]) == 0
def test_nbcourse(create_project):
"""Test sample with nbcourse.yml example file"""
NbCourse(Path('nbcourse.yml'))
@pytest.mark.skip(reason="material directories not available yet")
def test_nbcourse_build(create_project):
"""Test sample build with nbcourse.yml example file"""
course = NbCourse(Path('nbcourse.yml'))
course.conf['book']
with pytest.raises(SystemExit):
course.build(["-n 4"])
assert course.build(["-n 4"]) == 0
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