Esempio n. 1
0
 def test_multiple_issue_numbers_per_line(self):
     change_note = "# {}\r\nfix #2 also does fix #3 and fix #5\r\n".format(
         self.title
     )
     parser = IssuesParser(None, self.title)
     parser.parse(change_note)
     self.assertEqual(parser.content, [2, 3, 5])
Esempio n. 2
0
 def test_issue_numbers_with_links(self):
     change_note = "# {}\r\nfix [#2](https://issue)\r\nfix [#3](http://issue)\r\nfix #5\r\n".format(
         self.title
     )
     parser = IssuesParser(None, self.title)
     parser.parse(change_note)
     self.assertEqual(parser.content, [2, 3, 5])
Esempio n. 3
0
 def test_render(self):
     parser = IssuesParser(None, self.title)
     parser.content = ["1: foo"]
     self.assertEqual("# Issues\r\n\r\n#1: foo", parser.render())
Esempio n. 4
0
 def test_issue_numbers_and_other_numbers(self):
     change_note = "# {}\r\nfixes #2 but not # 3 or 5".format(self.title)
     parser = IssuesParser(None, self.title)
     parser.parse(change_note)
     self.assertEqual(parser.content, [2])
Esempio n. 5
0
 def test_issue_numbers(self):
     change_note = "# {}\r\nfix #2\r\nfix #3\r\nfix #5\r\n".format(
         self.title)
     parser = IssuesParser(None, self.title)
     parser.parse(change_note)
     self.assertEqual(parser.content, [2, 3, 5])
Esempio n. 6
0
 def _init_parsers(self):
     self.parsers.append(ChangeNotesLinesParser(self, "Critical Changes"))
     self.parsers.append(ChangeNotesLinesParser(self, "Changes"))
     self.parsers.append(IssuesParser(self, "Issues Closed"))
Esempio n. 7
0
 def _init_parsers(self):
     self.parsers.append(ChangeNotesLinesParser(self, 'Critical Changes'))
     self.parsers.append(ChangeNotesLinesParser(self, 'Changes'))
     self.parsers.append(IssuesParser(self, 'Issues Closed'))
Esempio n. 8
0
 def test_issue_numbers_and_other_numbers(self):
     change_note = "# {}\r\nfixes #2 but not # 3 or 5".format(self.title)
     parser = IssuesParser(None, self.title)
     parser.parse(change_note)
     self.assertEqual(parser.content, [2])
Esempio n. 9
0
 def test_issue_numbers(self):
     change_note = "# {}\r\nfix #2\r\nfix #3\r\nfix #5\r\n".format(self.title)
     parser = IssuesParser(None, self.title)
     parser.parse(change_note)
     self.assertEqual(parser.content, [2, 3, 5])
 def test_render(self):
     parser = IssuesParser(None, self.title)
     parser.content = ["1: foo"]
     self.assertEqual("# Issues\r\n\r\n#1: foo", parser.render())