Exemple #1
0
def test_cgroup_info_from_line(line, expected_info):
    info = CGroupInfo.from_line(line)
    info2 = CGroupInfo.from_line(line)

    # Check __eq__
    assert info == info2

    if expected_info is None:
        assert info is None, line
    else:
        for attr in ("id", "groups", "path", "container_id", "controllers", "pod_id"):
            assert getattr(info, attr) == getattr(expected_info, attr), line
def test_cgroup_info_from_line(line, expected_info):
    info = CGroupInfo.from_line(line)

    if expected_info is None:
        assert info is None, line
    else:
        for attr in ('id', 'groups', 'path', 'container_id', 'controllers', 'pod_id'):
            assert getattr(info, attr) == getattr(expected_info, attr), line