Determine whether license info added/removed #29 - #39
Merged
Conversation
* Refactor Delta._license_diff() and Delta.to_dict(). * Refactor failing tests, add six new tests. Signed-off-by: John M. Horan <johnmhoran@gmail.com>
* Check for license info added/removed before creating and
checking cutoff score lists.
Signed-off-by: John M. Horan <johnmhoran@gmail.com>
* Modified definitions of 'new_licenses' and 'old_licenses' to
delete "or []" -- appears not to be needed.
* Modified test for "license info added"/"license info removed"
where relevant score(s) < 'cutoff_score'.
Signed-off-by: John M. Horan <johnmhoran@gmail.com>
* In '_license_diff()', reverted to prior definitions of
'new_licenses' and 'old_licenses' by including "or []".
Signed-off-by: John M. Horan <johnmhoran@gmail.com>
steven-esser
suggested changes
Dec 21, 2017
| elif len(old_keys) == 0: | ||
| self.category = 'license info added' | ||
| else: | ||
| self.category = 'license change' |
Contributor
There was a problem hiding this comment.
We should not need to worry about info add or removed at this point in the code; this is already taken care of on line 187-190
| @@ -469,7 +490,7 @@ def test_Delta_license_diff_missing_diff_low_score_new(self): | |||
| result = deltacode.Delta(new_file, old_file, 'modified') | |||
| #result.license_diff() | |||
Contributor
There was a problem hiding this comment.
we can remove this comment.
Member
Author
There was a problem hiding this comment.
That comment actually appears in 10 different tests -- I'll delete each of them.
Signed-off-by: John M. Horan <johnmhoran@gmail.com>
steven-esser
approved these changes
Dec 21, 2017
arnav-mandal1234
pushed a commit
to arnav-mandal1234/deltacode
that referenced
this pull request
Mar 16, 2023
Update skeleton
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Delta._license_diff()andDelta.to_dict().cutoff_score.