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

Commitae0b6fe

Browse files
committed
Merge branch 'yarikoptic-bf/tests-on-debians'
2 parentsd8bbfea +fe426d4 commitae0b6fe

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

‎git/index/fun.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
S_IFREG,
1111
)
1212

13-
S_IFGITLINK=S_IFLNK|S_IFDIR# a submodule
14-
1513
fromioimportBytesIO
1614
importos
1715
importsubprocess
@@ -33,7 +31,6 @@
3331
CE_NAMEMASK,
3432
CE_STAGESHIFT
3533
)
36-
CE_NAMEMASK_INV=~CE_NAMEMASK
3734

3835
from .utilimport (
3936
pack,
@@ -47,6 +44,9 @@
4744
force_text
4845
)
4946

47+
S_IFGITLINK=S_IFLNK|S_IFDIR# a submodule
48+
CE_NAMEMASK_INV=~CE_NAMEMASK
49+
5050
__all__= ('write_cache','read_cache','write_tree_from_cache','entry_key',
5151
'stat_mode_to_index_mode','S_IFGITLINK','run_commit_hook','hook_path')
5252

‎git/test/lib/helper.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
fromgitimportRepo,Remote,GitCommandError,Git
1616
fromgit.compatimportstring_types
1717

18-
GIT_REPO=os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
18+
osp=os.path.dirname
19+
20+
GIT_REPO=os.environ.get("GIT_PYTHON_TEST_GIT_REPO_BASE",osp(osp(osp(osp(__file__)))))
1921

2022
__all__= (
2123
'fixture_path','fixture','absolute_project_path','StringProcessAdapter',
@@ -26,7 +28,7 @@
2628

2729

2830
deffixture_path(name):
29-
test_dir=os.path.dirname(os.path.dirname(__file__))
31+
test_dir=osp(osp(__file__))
3032
returnos.path.join(test_dir,"fixtures",name)
3133

3234

@@ -35,7 +37,7 @@ def fixture(name):
3537

3638

3739
defabsolute_project_path():
38-
returnos.path.abspath(os.path.join(os.path.dirname(__file__),"..",".."))
40+
returnos.path.abspath(os.path.join(osp(__file__),"..",".."))
3941

4042
#} END routines
4143

@@ -195,7 +197,7 @@ def remote_repo_creator(self):
195197

196198
d_remote.config_writer.set('url',remote_repo_url)
197199

198-
temp_dir=os.path.dirname(_mktemp())
200+
temp_dir=osp(_mktemp())
199201
# On windows, this will fail ... we deal with failures anyway and default to telling the user to do it
200202
try:
201203
gd=Git().daemon(temp_dir,enable='receive-pack',as_process=True)

‎git/test/test_base.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
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
89
importtempfile
910

1011
importgit.objects.baseasbase
@@ -116,6 +117,14 @@ def test_add_unicode(self, rw_repo):
116117
filename=u"שלום.txt"
117118

118119
file_path=os.path.join(rw_repo.working_dir,filename)
120+
121+
# verify first that we could encode file name in this environment
122+
try:
123+
file_path.encode(sys.getfilesystemencoding())
124+
exceptUnicodeEncodeError:
125+
fromnoseimportSkipTest
126+
raiseSkipTest("Environment doesn't support unicode filenames")
127+
119128
open(file_path,"wb").write(b'something')
120129

121130
ifos.name=='nt':

‎tox.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ commands = {posargs}
1818
[flake8]
1919
#show-source = True
2020
# E265 = comment blocks like @{ section, which it can't handle
21+
# E266 = too many leading '#' for block comment
22+
# E731 = do not assign a lambda expression, use a def
2123
# W293 = Blank line contains whitespace
22-
ignore = E265,W293
24+
ignore = E265,W293,E266,E731
2325
max-line-length = 120
2426
exclude = .tox,.venv,build,dist,doc,git/ext/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp