| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 68272aa commit d70ba69
10 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,7 @@ | |||
| 1 | 1 | # This module is part of GitPython and is released under the | |
| 2 | 2 | # 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/ | |
| 3 | 3 | ||
| 4 | + import gc | ||
| 4 | 5 | from io import BytesIO | |
| 5 | 6 | import logging | |
| 6 | 7 | import os | |
@@ -1079,8 +1080,6 @@ def remove( | |||
| 1079 | 1080 | self._clear_cache() | |
| 1080 | 1081 | wtd = mod.working_tree_dir | |
| 1081 | 1082 | del mod # Release file-handles (Windows). | |
| 1082 | - import gc | ||
| 1083 | - | ||
| 1084 | 1083 | gc.collect() | |
| 1085 | 1084 | rmtree(str(wtd)) | |
| 1086 | 1085 | # END delete tree if possible | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,6 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | 6 | """Performance tests for commits (iteration, traversal, and serialization).""" | |
| 7 | 7 | ||
| 8 | + import gc | ||
| 8 | 9 | from io import BytesIO | |
| 9 | 10 | from time import time | |
| 10 | 11 | import sys | |
@@ -17,8 +18,6 @@ | |||
| 17 | 18 | ||
| 18 | 19 | class TestPerformance(TestBigRepoRW, TestCommitSerialization): | |
| 19 | 20 | def tearDown(self): | |
| 20 | - import gc | ||
| 21 | - | ||
| 22 | 21 | gc.collect() | |
| 23 | 22 | ||
| 24 | 23 | # ref with about 100 commits in its history. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | 4 | """Performance tests for data streaming.""" | |
| 5 | 5 | ||
| 6 | + import gc | ||
| 6 | 7 | import os | |
| 7 | 8 | import subprocess | |
| 8 | 9 | import sys | |
@@ -92,8 +93,6 @@ def test_large_data_streaming(self, rwrepo): | |||
| 92 | 93 | ||
| 93 | 94 | # del db file so git has something to do. | |
| 94 | 95 | ostream = None | |
| 95 | - import gc | ||
| 96 | - | ||
| 97 | 96 | gc.collect() | |
| 98 | 97 | os.remove(db_file) | |
| 99 | 98 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,6 +3,7 @@ | |||
| 3 | 3 | # This module is part of GitPython and is released under the | |
| 4 | 4 | # 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/ | |
| 5 | 5 | ||
| 6 | + import gc | ||
| 6 | 7 | import os | |
| 7 | 8 | import sys | |
| 8 | 9 | import tempfile | |
@@ -20,8 +21,6 @@ | |||
| 20 | 21 | ||
| 21 | 22 | class TestBase(_TestBase): | |
| 22 | 23 | def tearDown(self): | |
| 23 | - import gc | ||
| 24 | - | ||
| 25 | 24 | gc.collect() | |
| 26 | 25 | ||
| 27 | 26 | type_tuples = ( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,6 +3,7 @@ | |||
| 3 | 3 | # This module is part of GitPython and is released under the | |
| 4 | 4 | # 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/ | |
| 5 | 5 | ||
| 6 | + import gc | ||
| 6 | 7 | import os | |
| 7 | 8 | import sys | |
| 8 | 9 | ||
@@ -16,8 +17,6 @@ | |||
| 16 | 17 | ||
| 17 | 18 | class Tutorials(TestBase): | |
| 18 | 19 | def tearDown(self): | |
| 19 | - import gc | ||
| 20 | - | ||
| 21 | 20 | gc.collect() | |
| 22 | 21 | ||
| 23 | 22 | # ACTUALLY skipped by git.util.rmtree (in local onerror function), from the last call to it via | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,6 +3,7 @@ | |||
| 3 | 3 | # This module is part of GitPython and is released under the | |
| 4 | 4 | # 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/ | |
| 5 | 5 | ||
| 6 | + import gc | ||
| 6 | 7 | import inspect | |
| 7 | 8 | import logging | |
| 8 | 9 | import os | |
@@ -34,8 +35,6 @@ def setUpClass(cls): | |||
| 34 | 35 | cls.git = Git(cls.rorepo.working_dir) | |
| 35 | 36 | ||
| 36 | 37 | def tearDown(self): | |
| 37 | - import gc | ||
| 38 | - | ||
| 39 | 38 | gc.collect() | |
| 40 | 39 | ||
| 41 | 40 | def _assert_logged_for_popen(self, log_watcher, name, value): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,14 +1,14 @@ | |||
| 1 | 1 | # This module is part of GitPython and is released under the | |
| 2 | 2 | # 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/ | |
| 3 | 3 | ||
| 4 | + import gc | ||
| 5 | + | ||
| 4 | 6 | from test.lib import TestBase | |
| 5 | 7 | from test.lib.helper import with_rw_directory | |
| 6 | 8 | ||
| 7 | 9 | ||
| 8 | 10 | class QuickDoc(TestBase): | |
| 9 | 11 | def tearDown(self): | |
| 10 | - import gc | ||
| 11 | - | ||
| 12 | 12 | gc.collect() | |
| 13 | 13 | ||
| 14 | 14 | @with_rw_directory | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,6 +3,7 @@ | |||
| 3 | 3 | # This module is part of GitPython and is released under the | |
| 4 | 4 | # 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/ | |
| 5 | 5 | ||
| 6 | + import gc | ||
| 6 | 7 | import os | |
| 7 | 8 | import os.path as osp | |
| 8 | 9 | from pathlib import Path | |
@@ -105,8 +106,6 @@ def assert_received_message(self): | |||
| 105 | 106 | ||
| 106 | 107 | class TestRemote(TestBase): | |
| 107 | 108 | def tearDown(self): | |
| 108 | - import gc | ||
| 109 | - | ||
| 110 | 109 | gc.collect() | |
| 111 | 110 | ||
| 112 | 111 | def _print_fetchhead(self, repo): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,6 +3,7 @@ | |||
| 3 | 3 | # This module is part of GitPython and is released under the | |
| 4 | 4 | # 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/ | |
| 5 | 5 | ||
| 6 | + import gc | ||
| 6 | 7 | import glob | |
| 7 | 8 | import io | |
| 8 | 9 | from io import BytesIO | |
@@ -72,8 +73,6 @@ def tearDown(self): | |||
| 72 | 73 | if osp.isfile(lfp): | |
| 73 | 74 | raise AssertionError("Previous TC left hanging git-lock file: {}".format(lfp)) | |
| 74 | 75 | ||
| 75 | - import gc | ||
| 76 | - | ||
| 77 | 76 | gc.collect() | |
| 78 | 77 | ||
| 79 | 78 | def test_new_should_raise_on_invalid_repo_location(self): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,6 +2,7 @@ | |||
| 2 | 2 | # 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/ | |
| 3 | 3 | ||
| 4 | 4 | import contextlib | |
| 5 | + import gc | ||
| 5 | 6 | import os | |
| 6 | 7 | import os.path as osp | |
| 7 | 8 | from pathlib import Path | |
@@ -61,8 +62,6 @@ def update(self, op, cur_count, max_count, message=""): | |||
| 61 | 62 | ||
| 62 | 63 | class TestSubmodule(TestBase): | |
| 63 | 64 | def tearDown(self): | |
| 64 | - import gc | ||
| 65 | - | ||
| 66 | 65 | gc.collect() | |
| 67 | 66 | ||
| 68 | 67 | k_subm_current = "c15a6e1923a14bc760851913858a3942a4193cdb" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments