def test_string_ordering():
    """Prefer ordering tasks by name first."""
    dsk = {("a", 1): (f,), ("a", 2): (f,), ("a", 3): (f,)}
    o = order(dsk)
    assert o == {("a", 1): 0, ("a", 2): 1, ("a", 3): 2}
Prefer ordering tasks by name first.
tests/core/serve/test_dag/test_order.py