diff options
author | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-09-25 18:08:16 +0200 |
---|---|---|
committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-09-26 13:37:16 +0200 |
commit | 51bf7cbe8216d9a1da723c59b6feece0b1a34589 (patch) | |
tree | 3d64fafd239f428717565c68db234f6db610c31c /git/test/test_diff.py | |
parent | 1210ec763e1935b95a3a909c61998fbd251b7575 (diff) | |
download | gitpython-51bf7cbe8216d9a1da723c59b6feece0b1a34589.tar.gz |
win: GC.collect on all TC.tearDown to fix appveyor hang runs
+ Fixed the hangs at `test_git:TestGit.test_handle_process_output()`.
[travisci skip]
Diffstat (limited to 'git/test/test_diff.py')
-rw-r--r-- | git/test/test_diff.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/git/test/test_diff.py b/git/test/test_diff.py index 9fdb26a2..8735dfc4 100644 --- a/git/test/test_diff.py +++ b/git/test/test_diff.py @@ -28,6 +28,10 @@ from git import ( class TestDiff(TestBase): + def tearDown(self): + import gc + gc.collect() + def _assert_diff_format(self, diffs): # verify that the format of the diff is sane for diff in diffs: @@ -107,12 +111,12 @@ class TestDiff(TestBase): def test_diff_of_modified_files_not_added_to_the_index(self): output = StringProcessAdapter(fixture('diff_abbrev-40_full-index_M_raw_no-color')) diffs = Diff._index_from_raw_format(self.rorepo, output.stdout) - + assert len(diffs) == 1, 'one modification' assert len(list(diffs.iter_change_type('M'))) == 1, 'one modification' assert diffs[0].change_type == 'M' assert diffs[0].b_blob is None - + def test_binary_diff(self): for method, file_name in ((Diff._index_from_patch_format, 'diff_patch_binary'), (Diff._index_from_raw_format, 'diff_raw_binary')): |