Changeset View
Changeset View
Standalone View
Standalone View
swh/model/tests/test_toposort.py
# Copyright (C) 2017-2018 The Software Heritage developers | # Copyright (C) 2017-2018 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import unittest | import unittest | ||||
from swh.model.toposort import toposort | from swh.model.toposort import toposort | ||||
def is_toposorted_slow(revision_log): | def is_toposorted_slow(revision_log): | ||||
"""Check (inefficiently) that the given revision log is in any topological | """Check (inefficiently) that the given revision log is in any topological | ||||
order. | order. | ||||
Complexity: O(n^2). | Complexity: O(n^2). | ||||
▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines |