def explicit_releases_error_on_unfound_issues(self): # Just a release - result will have 1.0.0, 1.0.1, and unreleased changelog = release_list('1.0.1') # No issues listed -> this clearly doesn't exist in any buckets changelog[1][0].append(Text("25")) # This should asplode construct_releases(changelog, make_app())
def explicit_bugfix_releases_get_removed_from_unreleased(self): b1 = b(1) b2 = b(2) changelog = release_list('1.0.1', b1, b2) # Ensure that 1.0.1 specifies bug 2 changelog[0][0].append(Text('2')) rendered, _ = construct_releases(changelog, make_app()) # 1.0.1 should have bug 2 only assert b2 in rendered[1]['entries'] assert b1 not in rendered[1]['entries'] # unreleased bug list should still get/see bug 1 assert b1 in rendered[2]['entries']
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']
def releases_can_specify_issues_explicitly(self): # Build regular list-o-entries b2 = b(2) b3 = b(3) changelog = release_list('1.0.1', '1.1.1', b3, b2, self.b, '1.1.0', self.f) # Modify 1.0.1 release to be speshul changelog[0][0].append(Text("2, 3")) rendered = construct_releases(changelog, make_app()) # 1.0.1 includes just 2 and 3, not bug 1 one_0_1 = rendered[3]['entries'] one_1_1 = rendered[2]['entries'] assert self.b not in one_0_1 assert b2 in one_0_1 assert b3 in one_0_1 # 1.1.1 includes all 3 (i.e. the explicitness of 1.0.1 didn't affect # the 1.1 line bucket.) assert self.b in one_1_1 assert b2 in one_1_1 assert b3 in one_1_1
def releases_can_specify_issues_explicitly(self): # Build regular list-o-entries b2 = b(2) b3 = b(3) changelog = release_list( '1.0.1', '1.1.1', b3, b2, self.b, '1.1.0', self.f ) # Modify 1.0.1 release to be speshul changelog[0][0].append(Text("2, 3")) rendered, _ = construct_releases(changelog, make_app()) # 1.0.1 includes just 2 and 3, not bug 1 one_0_1 = rendered[3]['entries'] one_1_1 = rendered[2]['entries'] assert self.b not in one_0_1 assert b2 in one_0_1 assert b3 in one_0_1 # 1.1.1 includes all 3 (i.e. the explicitness of 1.0.1 didn't affect # the 1.1 line bucket.) assert self.b in one_1_1 assert b2 in one_1_1 assert b3 in one_1_1
def explicit_release_list_split_works_with_unicode(self): changelog = release_list('1.0.1', b(17)) changelog[0][0].append(Text(six.text_type('17'))) # When using naive method calls, this explodes construct_releases(changelog, make_app())