Ejemplo n.º 1
0
 def release_line_bugfix_specifier(self):
     b50 = b(50)
     b42 = b(42, spec='1.1+')
     f25 = f(25)
     b35 = b(35)
     b34 = b(34)
     f22 = f(22)
     b20 = b(20)
     c = changelog2dict(releases(
         '1.2.1', '1.1.2', '1.0.3',
         b50, b42,
         '1.2.0', '1.1.1', '1.0.2',
         f25, b35, b34,
         '1.1.0', '1.0.1',
         f22, b20
     ))
     for rel, issues in (
         ('1.0.1', [b20]),
         ('1.1.0', [f22]),
         ('1.0.2', [b34, b35]),
         ('1.1.1', [b34, b35]),
         ('1.2.0', [f25]),
         ('1.0.3', [b50]), # the crux - is not b50 + b42
         ('1.1.2', [b50, b42]),
         ('1.2.1', [b50, b42]),
     ):
         eq_(set(c[rel]), set(issues))
Ejemplo n.º 2
0
 def explicit_feature_release_features_are_removed_from_unreleased(self):
     f1 = f(1)
     f2 = f(2)
     changelog = release_list('1.1.0', f1, f2)
     # Ensure that 1.1.0 specifies feature 2
     changelog[0][0].append(Text("2"))
     rendered = changelog2dict(construct_releases(changelog, make_app())[0])
     # 1.1.0 should have feature 2 only
     assert f2 in rendered['1.1.0']
     assert f1 not in rendered['1.1.0']
     # unreleased feature list should still get/see feature 1
     assert f1 in rendered['unreleased_1.x_feature']
     # now-released feature 2 should not be in unreleased_feature
     assert f2 not in rendered['unreleased_1.x_feature']
Ejemplo n.º 3
0
 def all_bugs_before_first_release_act_featurelike(self):
     b1 = b(1)
     f2 = f(2)
     b3 = b(3)
     implicit = list_item('', paragraph('', '', raw('', 'whatever')))
     changelog = changelog2dict(
         releases('0.1.1', b3, '0.1.0', f2, b1, implicit,
                  skip_initial=True))
     first = changelog['0.1.0']
     second = changelog['0.1.1']
     assert b1 in first
     assert f2 in first
     eq_(len(first), 3)  # Meh, hard to assert about the implicit one
     eq_(second, [b3])
Ejemplo n.º 4
0
 def all_bugs_before_first_release_act_featurelike(self):
     b1 = b(1)
     f2 = f(2)
     b3 = b(3)
     implicit = list_item('', paragraph('', '', raw('', 'whatever')))
     changelog = changelog2dict(releases(
         '0.1.1', b3, '0.1.0', f2, b1, implicit,
         skip_initial=True
     ))
     first = changelog['0.1.0']
     second = changelog['0.1.1']
     assert b1 in first
     assert f2 in first
     eq_(len(first), 3) # Meh, hard to assert about the implicit one
     eq_(second, [b3])
Ejemplo n.º 5
0
    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])
Ejemplo n.º 6
0
 def duplicate_zeroes_dont_error(self):
     cl = releases('1.0.1', b(0), b(0))
     cl = changelog2dict(cl)
     assert len(cl['1.0.1']) == 2
Ejemplo n.º 7
0
 def duplicate_issue_numbers_adds_two_issue_items(self):
     test_changelog = releases('1.0.1', self.b, self.b)
     test_changelog = changelog2dict(test_changelog)
     eq_(len(test_changelog['1.0.1']), 2)