def issues_are_sorted_by_type_within_releases(self): b1 = b(123, major=True) b2 = b(124, major=True) s1 = s(25) s2 = s(26) f1 = f(3455) f2 = f(3456) # Semi random definitely-not-in-desired-order order changelog = changelog2dict(releases('1.1', b1, s1, s2, f1, b2, f2)) # Order should be feature, bug, support. While it doesn't REALLY # matter, assert that within each category the order matches the old # 'reverse chronological' order. eq_(changelog['1.1'], [f2, f1, b2, b1, s2, s1])
def specs_and_keywords_play_together_nicely(self): b1 = b(1) b2 = b(2, major=True, spec='1.0+') f3 = f(3) # Feature copied to both 1.x and 2.x branches f4 = f(4, spec='1.0+') # Support item backported to bugfix line + 1.17 + 2.0.0 s5 = s(5, spec='1.0+', backported=True) entries = ( '2.0.0', '1.17.0', '1.16.1', s5, f4, f3, b2, b1, '1.16.0', ) expected = { '1.16.1': [b1, s5], # s5 backported ok '1.17.0': [b2, f4, s5], # s5 here too, plus major bug b2 '2.0.0': [b2, f3, f4, s5], # all featurelike items here } expect_releases(entries, expected)
def descriptions_are_parsed_for_issue_roles(self): item = list_item("", paragraph("", "", self.b.deepcopy(), s(5))) para = self._generate("1.0.2", item)[0] # Sanity check - in a broken parsing scenarion, the 4th child will be a # raw issue object assert not isinstance(para[4], Issue) # First/primary link _expect_type(para[2], reference) assert para[2].astext() == "#15" assert "Bug" in para[0].astext() # Second/inline link _expect_type(para[6], reference) assert para[6].astext() == "#5" assert "Support" in para[4].astext()
def descriptions_are_parsed_for_issue_roles(self): item = list_item('', paragraph('', '', self.b.deepcopy(), s(5)) ) para = self._generate('1.0.2', item)[0] # Sanity check - in a broken parsing scenarion, the 4th child will be a # raw issue object assert not isinstance(para[4], Issue) # First/primary link _expect_type(para[2], reference) eq_(para[2].astext(), '#15') assert 'Bug' in para[0].astext() # Second/inline link _expect_type(para[6], reference) eq_(para[6].astext(), '#5') assert 'Support' in para[4].astext()