Skip to content

Commit 1774f98

Browse files
committed
win: Attempt to GC after every TC to fix appveyor hang runs
1 parent 651a4be commit 1774f98

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

git/test/test_docs.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111

1212

1313
class Tutorials(TestBase):
14+
15+
def tearDown(self):
16+
import gc
17+
gc.collect()
18+
1419
@with_rw_directory
1520
def test_init_repo_object(self, rw_dir):
1621
# [1-test_init_repo_object]
@@ -64,7 +69,7 @@ def test_init_repo_object(self, rw_dir):
6469
assert repo.head.ref == repo.heads.master # head is a symbolic reference pointing to master
6570
assert repo.tags['0.3.5'] == repo.tag('refs/tags/0.3.5') # you can access tags in various ways too
6671
assert repo.refs.master == repo.heads['master'] # .refs provides access to all refs, i.e. heads ...
67-
72+
6873
if 'TRAVIS' not in os.environ:
6974
assert repo.refs['origin/master'] == repo.remotes.origin.refs.master # ... remotes ...
7075
assert repo.refs['0.3.5'] == repo.tags['0.3.5'] # ... and tags

git/test/test_git.py

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ def setUpClass(cls):
4040
super(TestGit, cls).setUpClass()
4141
cls.git = Git(cls.rorepo.working_dir)
4242

43+
def tearDown(self):
44+
import gc
45+
gc.collect()
46+
4347
@patch.object(Git, 'execute')
4448
def test_call_process_calls_execute(self, git):
4549
git.return_value = ''

0 commit comments

Comments
 (0)