Skip to content

Add more tests to test_patch and test_blob #758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 15, 2017
Merged

Add more tests to test_patch and test_blob #758

merged 5 commits into from
Dec 15, 2017

Conversation

brandonio21
Copy link
Contributor

As reported in #754 , there are some strange corruption-looking things happening with creating patches. In order to find strange behavior, I've crafted the tests attached to this PR.

At the time of writing, I could only get one of the tests to reliably fail: test_patch_multi_blob

Traceback (most recent call last):
  File "/home/engshare/third-party2/pygit2/0.26.2/src/build-gcc-5-glibc-2.23/pic/test/test_patch.py", line 231, in test_patch_multi_blob
    self.assertEqual(patch_text, [patch.patch for patch in patches])
AssertionError: Lists differ: [u'diff --git a/file b/file\nd... != [u'diff --git a/file b/file\nd...

First differing element 0:
diff --git a/file b/file
deleted file mode 100644
index a520c24..0000000
--- a/file
+++ /dev/null
@@ -1,3 +0,0 @@
-hello world
-hola mundo
-bonjour le monde

diff --git a/file b/file
deleted file mode 100644
index a520c24..0000000
--- a/file
+++ /dev/null
@@ -1,3 +0,0 @@
-@^H05

Diff is 11160 characters long. Set self.maxDiff to None to see it.

I don't think this PR should be merged in until the problem is fixed.

@brandonio21
Copy link
Contributor Author

YES! I FINALLY GOT THE BUG TO REPRO ON CI! LIFE IS GOOD!

@brandonio21
Copy link
Contributor Author

Going to rebase this

@jdavid
Copy link
Member

jdavid commented Dec 15, 2017

yes please

@brandonio21
Copy link
Contributor Author

@jdavid : It's ready to be merged in! Let's do it!

@jdavid jdavid merged commit 03deadb into libgit2:master Dec 15, 2017
@jdavid
Copy link
Member

jdavid commented Dec 15, 2017

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants