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

Commit5962373

Browse files
committed
cygwin, appveyor,gitpython-developers#533: Enable actual failures, hide certain 2+2 cases
1 parentec731f4 commit5962373

File tree

5 files changed

+43
-10
lines changed

5 files changed

+43
-10
lines changed

‎.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ build: false
7777

7878
test_script:
7979
-IF "%IS_CYGWIN%" == "yes" (
80-
nosetests -v || echo "Ignoring failures." & EXIT /B 0
80+
nosetests -v
8181
) ELSE (
8282
IF "%PYTHON_VERSION%" == "3.5" (
8383
nosetests -v --with-coverage

‎git/test/test_index.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
GitCommandError,
2727
CheckoutError,
2828
)
29-
fromgit.compatimportstring_types,is_win
29+
fromgit.compatimportstring_types,is_win,PY3
3030
fromgit.excimport (
3131
HookExecutionError,
3232
InvalidGitRepositoryError
@@ -49,6 +49,7 @@
4949
fromgitdb.baseimportIStream
5050

5151
importos.pathasosp
52+
fromgit.cmdimportGit
5253

5354

5455
classTestIndex(TestBase):
@@ -405,6 +406,12 @@ def _count_existing(self, repo, files):
405406
returnexisting
406407
# END num existing helper
407408

409+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandGit.is_cygwin(),
410+
"""FIXME: File "C:\projects\gitpython\git\test\test_index.py", line 642, in test_index_mutation
411+
self.assertEqual(fd.read(), link_target)
412+
AssertionError: '!<symlink>\xff\xfe/\x00e\x00t\x00c\x00/\x00t\x00h\x00a\x00t\x00\x00\x00'
413+
!= '/etc/that'
414+
""")
408415
@with_rw_repo('0.1.6')
409416
deftest_index_mutation(self,rw_repo):
410417
index=rw_repo.index
@@ -823,7 +830,7 @@ def test_index_bare_add(self, rw_bare_repo):
823830
asserted=True
824831
assertasserted,"Adding using a filename is not correctly asserted."
825832

826-
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandsys.version_info[:2]== (2,7),r"""
833+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandnotPY3,r"""
827834
FIXME: File "C:\projects\gitpython\git\util.py", line 125, in to_native_path_linux
828835
return path.replace('\\', '/')
829836
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)""")

‎git/test/test_repo.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,14 @@ def test_blame_complex_revision(self, git):
411411
self.assertEqual(len(res),1)
412412
self.assertEqual(len(res[0][1]),83,"Unexpected amount of parsed blame lines")
413413

414+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandGit.is_cygwin(),
415+
"""FIXME: File "C:\projects\gitpython\git\cmd.py", line 671, in execute
416+
raise GitCommandError(command, status, stderr_value, stdout_value)
417+
GitCommandError: Cmd('git') failed due to: exit code(128)
418+
cmdline: git add 1__��ava verb��ten 1_test _myfile 1_test_other_file
419+
1_��ava-----verb��ten
420+
stderr: 'fatal: pathspec '"1__çava verböten"' did not match any files'
421+
""")
414422
@with_rw_repo('HEAD',bare=False)
415423
deftest_untracked_files(self,rwrepo):
416424
forrun, (repo_add,is_invoking_git)inenumerate((

‎git/test/test_submodule.py

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
# This module is part of GitPython and is released under
23
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
34
importos
@@ -6,24 +7,34 @@
67

78
importgit
89
fromgit.cmdimportGit
9-
fromgit.compatimportstring_types,is_win
10+
fromgit.compatimport (
11+
string_types,
12+
is_win,
13+
)
1014
fromgit.excimport (
1115
InvalidGitRepositoryError,
1216
RepositoryDirtyError
1317
)
1418
fromgit.objects.submodule.baseimportSubmodule
15-
fromgit.objects.submodule.rootimportRootModule,RootUpdateProgress
19+
fromgit.objects.submodule.rootimport (
20+
RootModule,
21+
RootUpdateProgress,
22+
)
1623
fromgit.repo.funimport (
1724
find_git_dir,
18-
touch
25+
touch,
1926
)
2027
fromgit.test.libimport (
2128
TestBase,
22-
with_rw_repo
29+
with_rw_repo,
2330
)
2431
fromgit.test.libimportwith_rw_directory
25-
fromgit.utilimportHIDE_WINDOWS_KNOWN_ERRORS
26-
fromgit.utilimportto_native_path_linux,join_path_native
32+
fromgit.utilimport (
33+
to_native_path_linux,
34+
join_path_native,
35+
HIDE_WINDOWS_KNOWN_ERRORS,
36+
)
37+
2738
importos.pathasosp
2839

2940

@@ -673,6 +684,13 @@ def test_add_empty_repo(self, rwdir):
673684
url=empty_repo_dir,no_checkout=checkout_modeandTrueorFalse)
674685
# end for each checkout mode
675686

687+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandGit.is_cygwin(),
688+
"""FIXME: ile "C:\projects\gitpython\git\cmd.py", line 671, in execute
689+
raise GitCommandError(command, status, stderr_value, stdout_value)
690+
GitCommandError: Cmd('git') failed due to: exit code(128)
691+
cmdline: git add 1__Xava verbXXten 1_test _myfile 1_test_other_file 1_XXava-----verbXXten
692+
stderr: 'fatal: pathspec '"1__çava verböten"' did not match any files'
693+
""")
676694
@with_rw_directory
677695
deftest_git_submodules_and_add_sm_with_new_commit(self,rwdir):
678696
parent=git.Repo.init(osp.join(rwdir,'parent'))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp