| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -52,7 +52,7 @@ class TestBigRepoR(TestBase): | |||
| 52 | 52 | ||
| 53 | 53 | @classmethod | |
| 54 | 54 | def setUp(cls): | |
| 55 | - super(TestBigRepoR, cls).setUpAll() | ||
| 55 | + super(TestBigRepoR, cls).setUp() | ||
| 56 | 56 | repo_path = resolve_or_fail(k_env_git_repo) | |
| 57 | 57 | cls.gitrorepo = Repo(repo_path, odbt=GitCmdObjectDB) | |
| 58 | 58 | cls.puregitrorepo = Repo(repo_path, odbt=GitDB) | |
@@ -65,7 +65,7 @@ class TestBigRepoRW(TestBigRepoR): | |||
| 65 | 65 | ||
| 66 | 66 | @classmethod | |
| 67 | 67 | def setUp(cls): | |
| 68 | - super(TestBigRepoRW, cls).setUpAll() | ||
| 68 | + super(TestBigRepoRW, cls).setUp() | ||
| 69 | 69 | dirname = tempfile.mktemp() | |
| 70 | 70 | os.mkdir(dirname) | |
| 71 | 71 | cls.gitrwrepo = cls.gitrorepo.clone(dirname, shared=True, bare=True, odbt=GitCmdObjectDB) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,25 +5,24 @@ | |||
| 5 | 5 | # the BSD License: http://www.opensource.org/licenses/bsd-license.php | |
| 6 | 6 | ||
| 7 | 7 | import os, sys | |
| 8 | - from git.test.lib import ( | ||
| 9 | - TestBase, | ||
| 10 | - patch_object, | ||
| 8 | + from git.test.lib import ( TestBase, | ||
| 9 | + patch, | ||
| 11 | 10 | raises, | |
| 12 | 11 | assert_equal, | |
| 13 | 12 | assert_true, | |
| 14 | 13 | assert_match, | |
| 15 | - fixture_path | ||
| 16 | - ) | ||
| 17 | - from git import Git, GitCommandError | ||
| 14 | + fixture_path ) | ||
| 15 | + from git import ( Git, | ||
| 16 | + GitCommandError ) | ||
| 18 | 17 | ||
| 19 | 18 | class TestGit(TestBase): | |
| 20 | 19 | ||
| 21 | 20 | @classmethod | |
| 22 | 21 | def setUp(cls): | |
| 23 | - super(TestGit, cls).setUpAll() | ||
| 22 | + super(TestGit, cls).setUp() | ||
| 24 | 23 | cls.git = Git(cls.rorepo.working_dir) | |
| 25 | 24 | ||
| 26 | - @patch_object(Git, 'execute') | ||
| 25 | + @patch.object(Git, 'execute') | ||
| 27 | 26 | def test_call_process_calls_execute(self, git): | |
| 28 | 27 | git.return_value = '' | |
| 29 | 28 | self.git.version() | |
@@ -54,7 +53,7 @@ def test_it_accepts_stdin(self): | |||
| 54 | 53 | self.git.hash_object(istream=fh, stdin=True)) | |
| 55 | 54 | fh.close() | |
| 56 | 55 | ||
| 57 | - @patch_object(Git, 'execute') | ||
| 56 | + @patch.object(Git, 'execute') | ||
| 58 | 57 | def test_it_ignores_false_kwargs(self, git): | |
| 59 | 58 | # this_should_not_be_ignored=False implies it *should* be ignored | |
| 60 | 59 | output = self.git.version(pass_this_kwarg=False) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,15 @@ | |||
| 3 | 3 | # | |
| 4 | 4 | # This module is part of GitPython and is released under | |
| 5 | 5 | # the BSD License: http://www.opensource.org/licenses/bsd-license.php | |
| 6 | - from git.test.lib import * | ||
| 6 | + from git.test.lib import (patch, | ||
| 7 | + TestBase, | ||
| 8 | + with_rw_repo, | ||
| 9 | + fixture, | ||
| 10 | + GIT_REPO, | ||
| 11 | + assert_false, | ||
| 12 | + assert_equal, | ||
| 13 | + assert_true, | ||
| 14 | + raises) | ||
| 7 | 15 | from git import * | |
| 8 | 16 | from git.util import join_path_native | |
| 9 | 17 | from git.exc import BadObject | |
@@ -242,7 +250,7 @@ def test_archive(self): | |||
| 242 | 250 | self.rorepo.archive(tmpfile, '0.1.5') | |
| 243 | 251 | assert tmpfile.tell() | |
| 244 | 252 | ||
| 245 | - @patch_object(Git, '_call_process') | ||
| 253 | + @patch.object(Git, '_call_process') | ||
| 246 | 254 | def test_should_display_blame_information(self, git): | |
| 247 | 255 | git.return_value = fixture('blame') | |
| 248 | 256 | b = self.rorepo.blame( 'master', 'lib/git.py') | |
| Back | FazBrowse Home | New Git URL |
0 commit comments