test various ways to invoke process function
(g)
| 87 | |
| 88 | |
| 89 | def 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 | |
| 119 | def test_save(g): |
nothing calls this directly
no test coverage detected