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

Commit4545762

Browse files
committed
rmv python 3.5 checks from tests
1 parent6609ef7 commit4545762

8 files changed

+15
-24
lines changed

‎test/lib/helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ class TestBase(TestCase):
336336
- Class level repository which is considered read-only as it is shared among
337337
all test cases in your type.
338338
Access it using::
339-
self.rorepo # 'ro' stands for read-only
339+
self.rorepo # 'ro' stands for read-only
340340
341341
The rorepo is in fact your current project's git repo. If you refer to specific
342342
shas for your objects, be sure you choose some that are part of the immutable portion

‎test/test_base.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
importtempfile
1010
fromunittestimportSkipTest,skipIf
1111

12-
fromgitimport (
12+
fromgit.objectsimport (
1313
Blob,
1414
Tree,
1515
Commit,
@@ -18,17 +18,17 @@
1818
fromgit.compatimportis_win
1919
fromgit.objects.utilimportget_object_type_by_name
2020
fromtest.libimport (
21-
TestBase,
21+
TestBaseas_TestBase,
2222
with_rw_repo,
2323
with_rw_and_rw_remote_repo
2424
)
25-
fromgit.utilimporthex_to_bin
25+
fromgit.utilimporthex_to_bin,HIDE_WINDOWS_FREEZE_ERRORS
2626

2727
importgit.objects.baseasbase
2828
importos.pathasosp
2929

3030

31-
classTestBase(TestBase):
31+
classTestBase(_TestBase):
3232

3333
deftearDown(self):
3434
importgc
@@ -111,15 +111,13 @@ def test_with_rw_repo(self, rw_repo):
111111
assertnotrw_repo.config_reader("repository").getboolean("core","bare")
112112
assertosp.isdir(osp.join(rw_repo.working_tree_dir,'lib'))
113113

114-
#@skipIf(HIDE_WINDOWS_FREEZE_ERRORS, "FIXME: Freezes! sometimes...")
114+
@skipIf(HIDE_WINDOWS_FREEZE_ERRORS,"FIXME: Freezes! sometimes...")
115115
@with_rw_and_rw_remote_repo('0.1.6')
116116
deftest_with_rw_remote_and_rw_repo(self,rw_repo,rw_remote_repo):
117117
assertnotrw_repo.config_reader("repository").getboolean("core","bare")
118118
assertrw_remote_repo.config_reader("repository").getboolean("core","bare")
119119
assertosp.isdir(osp.join(rw_repo.working_tree_dir,'lib'))
120120

121-
@skipIf(sys.version_info< (3,)andis_win,
122-
"Unicode woes, see https://github.com/gitpython-developers/GitPython/pull/519")
123121
@with_rw_repo('0.1.6')
124122
deftest_add_unicode(self,rw_repo):
125123
filename="שלום.txt"

‎test/test_commit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def test_rev_list_bisect_all(self):
265265
@with_rw_directory
266266
deftest_ambiguous_arg_iteration(self,rw_dir):
267267
rw_repo=Repo.init(osp.join(rw_dir,'test_ambiguous_arg'))
268-
path=osp.join(rw_repo.working_tree_dir,'master')
268+
path=osp.join(str(rw_repo.working_tree_dir),'master')
269269
touch(path)
270270
rw_repo.index.add([path])
271271
rw_repo.index.commit('initial commit')

‎test/test_git.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
Repo,
1919
cmd
2020
)
21-
fromgit.compatimportis_darwin
2221
fromtest.libimport (
2322
TestBase,
2423
fixture_path
@@ -248,11 +247,7 @@ def test_environment(self, rw_dir):
248247
try:
249248
remote.fetch()
250249
exceptGitCommandErroraserr:
251-
ifsys.version_info[0]<3andis_darwin:
252-
self.assertIn('ssh-orig',str(err))
253-
self.assertEqual(err.status,128)
254-
else:
255-
self.assertIn('FOO',str(err))
250+
self.assertIn('FOO',str(err))
256251

257252
deftest_handle_process_output(self):
258253
fromgit.cmdimporthandle_process_output

‎test/test_refs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,14 @@ def test_heads(self, rwrepo):
119119
asserthead.tracking_branch()==remote_ref
120120
head.set_tracking_branch(None)
121121
asserthead.tracking_branch()isNone
122-
122+
123123
special_name='feature#123'
124124
special_name_remote_ref=SymbolicReference.create(rwrepo,'refs/remotes/origin/%s'%special_name)
125125
gp_tracking_branch=rwrepo.create_head('gp_tracking#123')
126126
special_name_remote_ref=rwrepo.remotes[0].refs[special_name]# get correct type
127127
gp_tracking_branch.set_tracking_branch(special_name_remote_ref)
128128
assertgp_tracking_branch.tracking_branch().path==special_name_remote_ref.path
129-
129+
130130
git_tracking_branch=rwrepo.create_head('git_tracking#123')
131131
rwrepo.git.branch('-u',special_name_remote_ref.name,git_tracking_branch.name)
132132
assertgit_tracking_branch.tracking_branch().name==special_name_remote_ref.name

‎test/test_remote.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,15 +347,15 @@ def _assert_push_and_pull(self, remote, rw_repo, remote_repo):
347347
progress=TestRemoteProgress()
348348
to_be_updated="my_tag.1.0RV"
349349
new_tag=TagReference.create(rw_repo,to_be_updated)# @UnusedVariable
350-
other_tag=TagReference.create(rw_repo,"my_obj_tag.2.1aRV",message="my message")
350+
other_tag=TagReference.create(rw_repo,"my_obj_tag.2.1aRV",logmsg="my message")
351351
res=remote.push(progress=progress,tags=True)
352352
self.assertTrue(res[-1].flags&PushInfo.NEW_TAG)
353353
progress.make_assertion()
354354
self._do_test_push_result(res,remote)
355355

356356
# update push new tags
357357
# Rejection is default
358-
new_tag=TagReference.create(rw_repo,to_be_updated,ref='HEAD~1',force=True)
358+
new_tag=TagReference.create(rw_repo,to_be_updated,reference='HEAD~1',force=True)
359359
res=remote.push(tags=True)
360360
self._do_test_push_result(res,remote)
361361
self.assertTrue(res[-1].flags&PushInfo.REJECTED)

‎test/test_submodule.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
44
importos
55
importshutil
6-
importsys
76
fromunittestimportskipIf
87

98
importgit
@@ -421,7 +420,7 @@ def test_base_rw(self, rwrepo):
421420
deftest_base_bare(self,rwrepo):
422421
self._do_base_tests(rwrepo)
423422

424-
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandsys.version_info[:2]== (3,5),"""
423+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORS,"""
425424
File "C:\\projects\\gitpython\\git\\cmd.py", line 559, in execute
426425
raise GitCommandNotFound(command, err)
427426
git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid')

‎test/test_tree.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
66

77
fromioimportBytesIO
8-
importsys
98
fromunittestimportskipIf
109

1110
fromgit.objectsimport (
@@ -20,7 +19,7 @@
2019

2120
classTestTree(TestBase):
2221

23-
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandsys.version_info[:2]== (3,5),"""
22+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORS,"""
2423
File "C:\\projects\\gitpython\\git\\cmd.py", line 559, in execute
2524
raise GitCommandNotFound(command, err)
2625
git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid')
@@ -53,7 +52,7 @@ def test_serializable(self):
5352
testtree._deserialize(stream)
5453
# END for each item in tree
5554

56-
@skipIf(HIDE_WINDOWS_KNOWN_ERRORSandsys.version_info[:2]== (3,5),"""
55+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORS,"""
5756
File "C:\\projects\\gitpython\\git\\cmd.py", line 559, in execute
5857
raise GitCommandNotFound(command, err)
5958
git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp