File: test_viz_colouring.py

package info (click to toggle)
python-parsl 2025.01.13%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,072 kB
  • sloc: python: 23,817; makefile: 349; sh: 276; ansic: 45
file content (18 lines) | stat: -rw-r--r-- 592 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import pytest

from parsl.dataflow.states import States


@pytest.mark.local
def test_all_states_colored() -> None:
    """This checks that the coloring tables in parsl-visualize contain
    a color for each state defined in the task state enumeration.
    """

    # imports inside test because viz can't be imported in an environment
    # with no monitoring installed
    import parsl.monitoring.visualization.plots.default.workflow_plots as workflow_plots

    for s in States:
        assert s.name in workflow_plots.gantt_colors
        assert s.name in workflow_plots.dag_state_colors