diff --git a/tasks.py b/tasks.py index 0f2457d..332e650 100644 --- a/tasks.py +++ b/tasks.py @@ -46,9 +46,16 @@ def ipynb(c): raise Exit(code=result) -@task(unittest, docs, ipynb) +@task def all(c): """Run all tests.""" + for cmd in (unittest, docs, ipynb): + try: + cmd(c) + except Exit as e: + if e.code != pytest.ExitCode.OK: + raise e + raise Exit(code=pytest.ExitCode.OK) test_collection.add_task(unittest) @@ -93,7 +100,11 @@ def release(c): raise Exit("Working tree is not clean. Aborting.") # run all tests - all(c) + try: + all(c) + except Exit as e: + if e.code != pytest.ExitCode.OK: + raise e version = iniconfig.IniConfig("setup.cfg").get("metadata", "version") # sanity checks while we have two places containing the version.