Use existing blobs in test_patch; Make create_from args optional #753
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.
Fixes #748
For some reason, when using
repo.create_blob(CONTENT)
in the test cases, tests failed (as reported in the issue) on some machines (Did not fail on my Mac OS machine, Did not fail on AppVeyor Windows machines, Did fail on my CentOS machine).I have no idea why that is. Perhaps I was doing something wrong.. perhaps there is something wrong with
create_blob
. I will create a followup issue to track it.In any case, this PR fixes the issue by using the already existing repo blobs for the test cases. Further, after learning more about pygit2, I switched
create_from
to take optional params.I think that 0.26.3 should be released after this PR is merged since 0.26.2 tests are broken for some users..