Skip to content

Commit

Permalink
test tiny cycle case
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli committed Jun 2, 2024
1 parent 5997c59 commit 4b7855a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test_pluginloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ def test_determining_setup_order_from_dependencies(mocker, deps, result):
assert m.call_count == 0


def test_dependency_cycle(mocker):
def test_simple_dependency_cycle(mocker):
m = mocker.Mock()
assert list(pluginloader._decide_loading_order({0: {0}}, m)) == []
m.assert_called_once_with([0, 0]) # cycle: 0 -> 0


def test_complex_dependency_cycle(mocker):
m = mocker.Mock()
order = list(
pluginloader._decide_loading_order({0: {1}, 1: {2}, 2: {3}, 3: {1}, 4: {3}, 5: set()}, m)
Expand Down

0 comments on commit 4b7855a

Please sign in to comment.