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

Function test_process_interface

test/test_graphs/test_callcommitgraph.py:89–116  ·  view source on GitHub ↗

test various ways to invoke process function

(g)

Source from the content-addressed store, hash-verified

87
88
89def test_process_interface(g):
90 """test various ways to invoke process function"""
91 repo_path = os.path.join(root_path, 'repos/test_feature_branch')
92 g1 = CallCommitGraph(repo_path)
93 # A B
94 g1.process(from_beginning=True, into_branches=True, num_commits=2)
95 # C D
96 g1.process(from_last_processed=True, into_branches=True, num_commits=2)
97 # E F K
98 g1.process(from_last_processed=True, into_branches=True, num_commits=3)
99 # should see "The range specified is empty, terminated."
100 g1.process(from_last_processed=True, into_branches=True, num_commits=1)
101 assert_callcommitgraphs_equal(g1, g)
102
103 g2 = CallCommitGraph(repo_path)
104 # should see "No history exists yet, terminated."
105 g2.process(from_last_processed=True, into_branches=True, num_commits=1)
106 # A B C
107 g2.process(from_beginning=True, into_branches=True, num_commits=3)
108 # D E F
109 g2.process(from_beginning=True,
110 into_branches=True,
111 end_commit_sha=g.commits[5].hexsha)
112 # K
113 g2.process(from_beginning=True,
114 into_branches=True,
115 end_commit_sha=g.commits[6].hexsha)
116 assert_callcommitgraphs_equal(g2, g)
117
118
119def test_save(g):

Callers

nothing calls this directly

Calls 3

CallCommitGraphClass · 0.90
processMethod · 0.45

Tested by

no test coverage detected