MCPcopy Index your code
hub / github.com/Persper/code-analytics / test_iterator

Function test_iterator

test/test_graphs/test_iterator.py:28–36  ·  view source on GitHub ↗
(ri)

Source from the content-addressed store, hash-verified

26
27
28def test_iterator(ri):
29 commits, branch_commits = ri.iter(from_beginning=True, into_branches=True)
30 # from A to L
31 # use `git log --graph` to view ground truth
32 assert(len(ri.visited) == 12)
33 assert(len(commits) == 4)
34 assert(len(branch_commits) == 8)
35 assert(serialized_messages(commits) == 'D C B A')
36 assert(serialized_messages(branch_commits) == 'G F E J I H L K')
37
38
39def test_continue_iter(ri):

Callers

nothing calls this directly

Calls 2

serialized_messagesFunction · 0.70
iterMethod · 0.45

Tested by

no test coverage detected