| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent cd9d7a9 commit f72e282
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,26 +3,17 @@ | |||
| 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 ddt | ||
| 6 | + import os | ||
| 7 | + import os.path as osp | ||
| 7 | 8 | import shutil | |
| 8 | 9 | import tempfile | |
| 9 | - from git import ( | ||
| 10 | - Repo, | ||
| 11 | - GitCommandError, | ||
| 12 | - Diff, | ||
| 13 | - DiffIndex, | ||
| 14 | - NULL_TREE, | ||
| 15 | - Submodule, | ||
| 16 | - ) | ||
| 17 | - from git.cmd import Git | ||
| 18 | - from test.lib import ( | ||
| 19 | - TestBase, | ||
| 20 | - StringProcessAdapter, | ||
| 21 | - fixture, | ||
| 22 | - ) | ||
| 23 | - from test.lib import with_rw_directory | ||
| 24 | 10 | ||
| 25 | - import os.path as osp | ||
| 11 | + import ddt | ||
| 12 | + import pytest | ||
| 13 | + | ||
| 14 | + from git import NULL_TREE, Diff, DiffIndex, GitCommandError, Repo, Submodule | ||
| 15 | + from git.cmd import Git | ||
| 16 | + from test.lib import StringProcessAdapter, TestBase, fixture, with_rw_directory | ||
| 26 | 17 | ||
| 27 | 18 | ||
| 28 | 19 | def to_raw(input): | |
@@ -318,6 +309,11 @@ def test_diff_with_spaces(self): | |||
| 318 | 309 | self.assertIsNone(diff_index[0].a_path, repr(diff_index[0].a_path)) | |
| 319 | 310 | self.assertEqual(diff_index[0].b_path, "file with spaces", repr(diff_index[0].b_path)) | |
| 320 | 311 | ||
| 312 | + @pytest.mark.xfail( | ||
| 313 | + os.name == "nt", | ||
| 314 | + reason='"Access is denied" when tearDown calls shutil.rmtree', | ||
| 315 | + raises=PermissionError, | ||
| 316 | + ) | ||
| 321 | 317 | def test_diff_submodule(self): | |
| 322 | 318 | """Test that diff is able to correctly diff commits that cover submodule changes""" | |
| 323 | 319 | # Init a temp git repo that will be referenced as a submodule. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments