Exemplo n.º 1
0
def test_plot(test_data, tmp_path):
    """Ensure the plotting mechanism doesn't raise errors."""
    assert _plot(_transpose(test_data), tmp_path)
    assert list(tmp_path.iterdir()) == [
        Path(tmp_path, 'cylc.flow.main_loop.log_main_loop.pdf')
    ]
Exemplo n.º 2
0
def test_normalise(test_data):
    """Ensure we correctly normalise the timings against the earliest time."""
    assert _normalise(_transpose(test_data)) == {
        'baz': ((3, ), ('d', )),
        'foo': ((0, 1, 2), ('a', 'b', 'c'))
    }
Exemplo n.º 3
0
def test_dump(test_data, tmp_path):
    """Ensure the data is serialiseable."""
    assert _dump(_transpose(test_data), tmp_path)
    assert list(tmp_path.iterdir()) == [
        Path(tmp_path, 'cylc.flow.main_loop.log_main_loop.json')
    ]
Exemplo n.º 4
0
def test_transpose(test_data):
    """Ensure we can orient the data around main-loop-time/plugin-time."""
    assert _transpose(test_data) == {
        'baz': ((4, ), ('d', )),
        'foo': ((1, 2, 3), ('a', 'b', 'c'))
    }