Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6df78b1

Browse files
committed
Appveyor: Add and set HIDE_WINDOWS_KNOWN_ERRORS=False
+ Collect all "acknowledged" failing TCs on Appveyor and use"HIDE_WINDOWS_KNOWN_ERRORS" var to hide them.
1 parent1b44082 commit6df78b1

File tree

8 files changed

+90
-40
lines changed

8 files changed

+90
-40
lines changed

‎git/test/lib/helper.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232

3333
log=logging.getLogger('git.util')
3434

35+
#: We need an easy way to see if Appveyor TCs start failing,
36+
#: so the errors marked with this var are considered "acknowledged" ones, awaiting remedy,
37+
#: till then, we wish to hide them.
38+
HIDE_WINDOWS_KNOWN_ERRORS=bool(os.environ.get('HIDE_WINDOWS_KNOWN_ERRORS',False))
39+
3540
#{ Routines
3641

3742

‎git/test/performance/lib.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#{ Invvariants
2121
k_env_git_repo="GIT_PYTHON_TEST_GIT_REPO_BASE"
22+
2223
#} END invariants
2324

2425

‎git/test/performance/test_odb.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
fromunittest.caseimportskipIf
77

88
fromgit.compatimportis_win,PY3
9+
fromgit.test.lib.helperimportHIDE_WINDOWS_KNOWN_ERRORS
910

1011
from .libimport (
1112
TestBigRepoR
@@ -14,7 +15,8 @@
1415

1516
classTestObjDBPerformance(TestBigRepoR):
1617

17-
@skipIf(is_winandPY3,"FIXME: smmp fails with: TypeError: Can't convert 'bytes' object to str implicitly")
18+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandis_winandPY3,
19+
"FIXME: smmp fails with: TypeError: Can't convert 'bytes' object to str implicitly")
1820
deftest_random_access(self):
1921
results= [["Iterate Commits"], ["Iterate Blobs"], ["Retrieve Blob Data"]]
2022
forrepoin (self.gitrorepo,self.puregitrorepo):

‎git/test/test_docs.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
# This module is part of GitPython and is released under
66
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
77
importos
8+
importsys
9+
fromunittest.caseimportskipIf
810

11+
fromgit.compatimportis_win
12+
fromgit.test.lib.helperimportHIDE_WINDOWS_KNOWN_ERRORS
913
fromgit.test.libimportTestBase
1014
fromgit.test.lib.helperimportwith_rw_directory
1115

@@ -16,6 +20,9 @@ def tearDown(self):
1620
importgc
1721
gc.collect()
1822

23+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandis_winandsys.version_info[:2]in ((2,7), (3,4)),
24+
"FIXME: helper.wrapper fails with: PermissionError: [WinError 5] Access is denied: "
25+
"'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\test_work_tree_unsupportedryfa60di\\master_repo\\.git\\objects\\pack\\pack-bc9e0787aef9f69e1591ef38ea0a6f566ec66fe3.idx")# noqa E501
1926
@with_rw_directory
2027
deftest_init_repo_object(self,rw_dir):
2128
# [1-test_init_repo_object]

‎git/test/test_index.py

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
# This module is part of GitPython and is released under
66
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
77

8-
fromgit.test.libimport (
9-
TestBase,
10-
fixture_path,
11-
fixture,
12-
with_rw_repo
13-
)
14-
fromgit.utilimportActor,rmtree
15-
fromgit.excimport (
16-
HookExecutionError,
17-
InvalidGitRepositoryError
8+
fromioimportBytesIO
9+
importos
10+
fromstatimport (
11+
S_ISLNK,
12+
ST_MODE
1813
)
14+
importsys
15+
importtempfile
16+
fromunittest.caseimportskipIf
17+
1918
fromgitimport (
2019
IndexFile,
2120
Repo,
@@ -28,24 +27,27 @@
2827
CheckoutError,
2928
)
3029
fromgit.compatimportstring_types,is_win
31-
fromgitdb.utilimporthex_to_bin
32-
importos
33-
importsys
34-
importtempfile
35-
fromstatimport (
36-
S_ISLNK,
37-
ST_MODE
30+
fromgit.excimport (
31+
HookExecutionError,
32+
InvalidGitRepositoryError
3833
)
39-
40-
fromioimportBytesIO
41-
fromgitdb.baseimportIStream
42-
fromgit.objectsimportBlob
34+
fromgit.index.funimporthook_path
4335
fromgit.index.typimport (
4436
BaseIndexEntry,
4537
IndexEntry
4638
)
47-
fromgit.index.funimporthook_path
39+
fromgit.objectsimportBlob
40+
fromgit.test.libimport (
41+
TestBase,
42+
fixture_path,
43+
fixture,
44+
with_rw_repo
45+
)
46+
fromgit.test.lib.helperimportHIDE_WINDOWS_KNOWN_ERRORS
4847
fromgit.test.libimportwith_rw_directory
48+
fromgit.utilimportActor,rmtree
49+
fromgitdb.baseimportIStream
50+
fromgitdb.utilimporthex_to_bin
4951

5052

5153
classTestIndex(TestBase):
@@ -821,6 +823,10 @@ def test_index_bare_add(self, rw_bare_repo):
821823
asserted=True
822824
assertasserted,"Adding using a filename is not correctly asserted."
823825

826+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandis_winandsys.version_info[:2]== (2,7),r"""
827+
FIXME: File "C:\projects\gitpython\git\util.py", line 125, in to_native_path_linux
828+
return path.replace('\\', '/')
829+
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)""")
824830
@with_rw_directory
825831
deftest_add_utf8P_path(self,rw_dir):
826832
# NOTE: fp is not a Unicode object in python 2 (which is the source of the problem)

‎git/test/test_repo.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
importglob
88
fromioimportBytesIO
99
importitertools
10-
importfunctoolsasfnt
1110
importos
1211
importpickle
1312
importsys
1413
importtempfile
14+
fromunittest.caseimportskipIf
1515

1616
fromgitimport (
1717
InvalidGitRepositoryError,
@@ -50,13 +50,14 @@
5050
assert_true,
5151
raises
5252
)
53+
fromgit.test.lib.helperimportHIDE_WINDOWS_KNOWN_ERRORS
5354
fromgit.test.libimportwith_rw_directory
5455
fromgit.utilimportjoin_path_native,rmtree,rmfile
5556
fromgitdb.utilimportbin_to_hex
5657
fromnoseimportSkipTest
5758

59+
importfunctoolsasfnt
5860
importos.pathasosp
59-
fromunittest.caseimportskipIf
6061

6162

6263
defiter_flatten(lol):
@@ -796,7 +797,8 @@ def test_git_file(self, rwrepo):
796797
git_file_repo=Repo(rwrepo.working_tree_dir)
797798
self.assertEqual(os.path.abspath(git_file_repo.git_dir),real_path_abs)
798799

799-
@skipIf(is_winandPY3,"FIXME: smmp fails with: TypeError: Can't convert 'bytes' object to str implicitly")
800+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandis_winandPY3,
801+
"FIXME: smmp fails with: TypeError: Can't convert 'bytes' object to str implicitly")
800802
deftest_file_handle_leaks(self):
801803
deflast_commit(repo,rev,path):
802804
commit=next(repo.iter_commits(rev,path,max_count=1))
@@ -895,6 +897,9 @@ def test_is_ancestor(self):
895897
fori,jinitertools.permutations([c1,'ffffff',''],r=2):
896898
self.assertRaises(GitCommandError,repo.is_ancestor,i,j)
897899

900+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandis_win,
901+
"FIXME: helper.wrapper fails with: PermissionError: [WinError 5] Access is denied: "
902+
"'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\test_work_tree_unsupportedryfa60di\\master_repo\\.git\\objects\\pack\\pack-bc9e0787aef9f69e1591ef38ea0a6f566ec66fe3.idx")# noqa E501
898903
@with_rw_directory
899904
deftest_work_tree_unsupported(self,rw_dir):
900905
git=Git(rw_dir)

‎git/test/test_submodule.py

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
# This module is part of GitPython and is released under
22
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
3-
importsys
43
importos
4+
importsys
5+
fromunittest.caseimportskipIf
56

67
importgit
7-
8-
fromgit.test.libimport (
9-
TestBase,
10-
with_rw_repo
11-
)
12-
fromgit.test.libimportwith_rw_directory
8+
fromgit.compatimportstring_types,is_win
139
fromgit.excimport (
1410
InvalidGitRepositoryError,
1511
RepositoryDirtyError
1612
)
1713
fromgit.objects.submodule.baseimportSubmodule
1814
fromgit.objects.submodule.rootimportRootModule,RootUpdateProgress
19-
fromgit.utilimportto_native_path_linux,join_path_native
20-
fromgit.compatimportstring_types,is_win
2115
fromgit.repo.funimport (
2216
find_git_dir,
2317
touch
2418
)
25-
fromunittest.caseimportskipIf
19+
fromgit.test.libimport (
20+
TestBase,
21+
with_rw_repo
22+
)
23+
fromgit.test.libimportwith_rw_directory
24+
fromgit.test.lib.helperimportHIDE_WINDOWS_KNOWN_ERRORS
25+
fromgit.utilimportto_native_path_linux,join_path_native
26+
2627

2728
# Change the configuration if possible to prevent the underlying memory manager
2829
# to keep file handles open. On windows we get problems as they are not properly
@@ -417,7 +418,8 @@ def _do_base_tests(self, rwrepo):
417418
# Error if there is no submodule file here
418419
self.failUnlessRaises(IOError,Submodule._config_parser,rwrepo,rwrepo.commit(self.k_no_subm_tag),True)
419420

420-
@skipIf(is_win,"FIXME: fails with: PermissionError: [WinError 32] The process cannot access the file because"
421+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandis_win,
422+
"FIXME: fails with: PermissionError: [WinError 32] The process cannot access the file because"
421423
"it is being used by another process: "
422424
"'C:\\Users\\ankostis\\AppData\\Local\\Temp\\tmp95c3z83bnon_bare_test_base_rw\\git\\ext\\gitdb\\gitdb\\ext\\smmap'")# noqa E501
423425
@with_rw_repo(k_subm_current)
@@ -428,6 +430,11 @@ def test_base_rw(self, rwrepo):
428430
deftest_base_bare(self,rwrepo):
429431
self._do_base_tests(rwrepo)
430432

433+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandis_winandsys.version_info[:2]== (3,4),"""
434+
File "C:\projects\gitpython\git\cmd.py", line 559, in execute
435+
raise GitCommandNotFound(command, err)
436+
git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid')
437+
cmdline: git clone -n --shared -v C:\projects\gitpython\.git Users\appveyor\AppData\Local\Temp\1\tmplyp6kr_rnon_bare_test_root_module""")# noqa E501
431438
@with_rw_repo(k_subm_current,bare=False)
432439
deftest_root_module(self,rwrepo):
433440
# Can query everything without problems
@@ -726,6 +733,9 @@ def test_git_submodules_and_add_sm_with_new_commit(self, rwdir):
726733
assertcommit_sm.binsha==sm_too.binsha
727734
assertsm_too.binsha!=sm.binsha
728735

736+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandis_win,
737+
"FIXME: helper.wrapper fails with: PermissionError: [WinError 5] Access is denied: "
738+
"'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\test_work_tree_unsupportedryfa60di\\master_repo\\.git\\objects\\pack\\pack-bc9e0787aef9f69e1591ef38ea0a6f566ec66fe3.idx")# noqa E501
729739
@with_rw_directory
730740
deftest_git_submodule_compatibility(self,rwdir):
731741
parent=git.Repo.init(os.path.join(rwdir,'parent'))

‎git/test/test_tree.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,27 @@
44
# This module is part of GitPython and is released under
55
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
66

7+
fromioimportBytesIO
78
importos
8-
fromgit.test.libimportTestBase
9+
importsys
10+
fromunittest.caseimportskipIf
11+
912
fromgitimport (
1013
Tree,
1114
Blob
1215
)
13-
14-
fromioimportBytesIO
16+
fromgit.compatimportis_win
17+
fromgit.test.lib.helperimportHIDE_WINDOWS_KNOWN_ERRORS
18+
fromgit.test.libimportTestBase
1519

1620

1721
classTestTree(TestBase):
1822

23+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandis_winandsys.version_info[:2]== (3,4),"""
24+
File "C:\projects\gitpython\git\cmd.py", line 559, in execute
25+
raise GitCommandNotFound(command, err)
26+
git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid')
27+
cmdline: git cat-file --batch-check""")
1928
deftest_serializable(self):
2029
# tree at the given commit contains a submodule as well
2130
roottree=self.rorepo.tree('6c1faef799095f3990e9970bc2cb10aa0221cf9c')
@@ -44,6 +53,11 @@ def test_serializable(self):
4453
testtree._deserialize(stream)
4554
# END for each item in tree
4655

56+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandis_winandsys.version_info[:2]== (3,4),"""
57+
File "C:\projects\gitpython\git\cmd.py", line 559, in execute
58+
raise GitCommandNotFound(command, err)
59+
git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid')
60+
cmdline: git cat-file --batch-check""")
4761
deftest_traverse(self):
4862
root=self.rorepo.tree('0.1.6')
4963
num_recursive=0

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp