Skip to content

The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.

393 B
Raw Blame
from collections import deque

import pytest

from worker import process, run


def test_process_email():
    assert process({"kind": "email", "to": "[email protected]"}) == "sent email to [email protected]"


def test_unknown_kind():
    with pytest.raises(ValueError):
        process({"kind": "nope"})


def test_run_skips_bad_jobs():
    assert run(deque([{"kind": "report", "name": "x"}, {"kind": "bad"}])) == 1