예제 #1
0
 def test_matcher_set(self):
     args = ('--issue-matcher', 'test', 'r', 's', 'e')
     result = commit_report.parse_args(args=args)
     self.assertEqual(result.issue_id_regex, 'test')
예제 #2
0
 def test_template_set(self):
     args = ('--link-template', 'test', 'r', 's', 'e')
     result = commit_report.parse_args(args=args)
     self.assertEqual(result.link_template, 'test')
예제 #3
0
 def test_matcher_default(self):
     args = ('r', 's', 'e')
     result = commit_report.parse_args(args=args)
     self.assertEqual(result.issue_id_regex, commit_report.DEFAULT_ISSUE_ID_MATCHER)
예제 #4
0
 def test_end(self):
     args = ('r', 's', 'e')
     result = commit_report.parse_args(args=args)
     self.assertEqual(result.end, 'e')
예제 #5
0
 def test_template_default(self):
     args = ('r', 's', 'e')
     result = commit_report.parse_args(args=args)
     self.assertEqual(result.link_template, commit_report.DEFAULT_LINK_TEMPLATE)
예제 #6
0
 def test_start(self):
     args = ('r', 's', 'e')
     result = commit_report.parse_args(args=args)
     self.assertEqual(result.start, 's')
예제 #7
0
 def test_issue_links_selected(self):
     args = ('--issue-links', '1', '2', '3')
     result = commit_report.parse_args(args=args)
     self.assertEqual(result.links, True)
예제 #8
0
 def test_issue_links_unselected(self):
     args = ('1', '2', '3')
     result = commit_report.parse_args(args=args)
     self.assertEqual(result.links, False)
예제 #9
0
 def test_json(self):
     args = ('--json', '1', '2', '3')
     result = commit_report.parse_args(args=args)
     self.assertEqual(result.formatter, commit_report.format_for_json)
예제 #10
0
 def test_human_selected(self):
     args = ('--human', '1', '2', '3')
     result = commit_report.parse_args(args=args)
     self.assertEqual(result.formatter, commit_report.format_for_humans)