| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,15 @@ | |||
| 1 | + version = 1 | ||
| 2 | + | ||
| 3 | + test_patterns = [ | ||
| 4 | + 'git/test/**/test_*.py' | ||
| 5 | + ] | ||
| 6 | + | ||
| 7 | + exclude_patterns = [ | ||
| 8 | + 'doc/**', | ||
| 9 | + 'etc/sublime-text' | ||
| 10 | + ] | ||
| 11 | + | ||
| 12 | + [[analyzers]] | ||
| 13 | + name = 'python' | ||
| 14 | + enabled = true | ||
| 15 | + runtime_version = '2.x.x' | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -864,9 +864,8 @@ def remove(self, module=True, force=False, configuration=True, dry_run=False): | |||
| 864 | 864 | rmtree(wtd) | |
| 865 | 865 | except Exception as ex: | |
| 866 | 866 | if HIDE_WINDOWS_KNOWN_ERRORS: | |
| 867 | - raise SkipTest("FIXME: fails with: PermissionError\n %s", ex) | ||
| 868 | - else: | ||
| 869 | - raise | ||
| 867 | + raise SkipTest("FIXME: fails with: PermissionError\n {}".format(ex)) | ||
| 868 | + raise | ||
| 870 | 869 | # END delete tree if possible | |
| 871 | 870 | # END handle force | |
| 872 | 871 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,7 +38,7 @@ def setUp(self): | |||
| 38 | 38 | def tearDown(self): | |
| 39 | 39 | for lfp in glob.glob(_tc_lock_fpaths): | |
| 40 | 40 | if osp.isfile(lfp): | |
| 41 | - raise AssertionError('Previous TC left hanging git-lock file: %s', lfp) | ||
| 41 | + raise AssertionError('Previous TC left hanging git-lock file: {}'.format(lfp)) | ||
| 42 | 42 | ||
| 43 | 43 | def _to_memcache(self, file_path): | |
| 44 | 44 | with open(file_path, "rb") as fp: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -134,15 +134,18 @@ def test_it_accepts_environment_variables(self): | |||
| 134 | 134 | ||
| 135 | 135 | def test_persistent_cat_file_command(self): | |
| 136 | 136 | # read header only | |
| 137 | - import subprocess as sp | ||
| 138 | 137 | hexsha = "b2339455342180c7cc1e9bba3e9f181f7baa5167" | |
| 139 | - g = self.git.cat_file(batch_check=True, istream=sp.PIPE, as_process=True) | ||
| 138 | + g = self.git.cat_file( | ||
| 139 | + batch_check=True, istream=subprocess.PIPE, as_process=True | ||
| 140 | + ) | ||
| 140 | 141 | g.stdin.write(b"b2339455342180c7cc1e9bba3e9f181f7baa5167\n") | |
| 141 | 142 | g.stdin.flush() | |
| 142 | 143 | obj_info = g.stdout.readline() | |
| 143 | 144 | ||
| 144 | 145 | # read header + data | |
| 145 | - g = self.git.cat_file(batch=True, istream=sp.PIPE, as_process=True) | ||
| 146 | + g = self.git.cat_file( | ||
| 147 | + batch=True, istream=subprocess.PIPE, as_process=True | ||
| 148 | + ) | ||
| 146 | 149 | g.stdin.write(b"b2339455342180c7cc1e9bba3e9f181f7baa5167\n") | |
| 147 | 150 | g.stdin.flush() | |
| 148 | 151 | obj_info_two = g.stdout.readline() | |
@@ -160,7 +163,7 @@ def test_persistent_cat_file_command(self): | |||
| 160 | 163 | ||
| 161 | 164 | # same can be achieved using the respective command functions | |
| 162 | 165 | hexsha, typename, size = self.git.get_object_header(hexsha) | |
| 163 | - hexsha, typename_two, size_two, data = self.git.get_object_data(hexsha) # @UnusedVariable | ||
| 166 | + hexsha, typename_two, size_two, _ = self.git.get_object_data(hexsha) | ||
| 164 | 167 | self.assertEqual(typename, typename_two) | |
| 165 | 168 | self.assertEqual(size, size_two) | |
| 166 | 169 | ||
@@ -264,7 +267,7 @@ def test_environment(self, rw_dir): | |||
| 264 | 267 | remote.fetch() | |
| 265 | 268 | except GitCommandError as err: | |
| 266 | 269 | if sys.version_info[0] < 3 and is_darwin: | |
| 267 | - self.assertIn('ssh-orig, ' in str(err)) | ||
| 270 | + self.assertIn('ssh-orig', str(err)) | ||
| 268 | 271 | self.assertEqual(err.status, 128) | |
| 269 | 272 | else: | |
| 270 | 273 | self.assertIn('FOO', str(err)) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -90,7 +90,7 @@ def setUp(self): | |||
| 90 | 90 | def tearDown(self): | |
| 91 | 91 | for lfp in glob.glob(_tc_lock_fpaths): | |
| 92 | 92 | if osp.isfile(lfp): | |
| 93 | - raise AssertionError('Previous TC left hanging git-lock file: %s', lfp) | ||
| 93 | + raise AssertionError('Previous TC left hanging git-lock file: {}'.format(lfp)) | ||
| 94 | 94 | import gc | |
| 95 | 95 | gc.collect() | |
| 96 | 96 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -98,9 +98,8 @@ def onerror(func, path, exc_info): | |||
| 98 | 98 | func(path) # Will scream if still not possible to delete. | |
| 99 | 99 | except Exception as ex: | |
| 100 | 100 | if HIDE_WINDOWS_KNOWN_ERRORS: | |
| 101 | - raise SkipTest("FIXME: fails with: PermissionError\n %s", ex) | ||
| 102 | - else: | ||
| 103 | - raise | ||
| 101 | + raise SkipTest("FIXME: fails with: PermissionError\n {}".format(ex)) | ||
| 102 | + raise | ||
| 104 | 103 | ||
| 105 | 104 | return shutil.rmtree(path, False, onerror) | |
| 106 | 105 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments