1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
import pytest
import parsl
from parsl.tests.configs.local_threads import fresh_config
@parsl.python_app
def succeed():
pass
@parsl.python_app
def fail():
raise RuntimeError("Deliberate failure in fail() app")
@pytest.mark.local
def test_summary(caplog):
parsl.load(fresh_config())
succeed().result()
fail().exception()
parsl.dfk().cleanup()
assert "Summary of tasks in DFK:" in caplog.text
assert "Tasks in state States.exec_done: 1" in caplog.text
assert "Tasks in state States.failed: 1" in caplog.text
|