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

Commit4cfc682

Browse files
committed
test_submodule works
1 parent8f219b5 commit4cfc682

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

‎git/objects/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def new_from_sha(cls, repo, sha1):
6060
:param sha1: 20 byte binary sha1"""
6161
ifsha1==cls.NULL_BIN_SHA:
6262
# the NULL binsha is always the root commit
63-
returnget_object_type_by_name('commit')(repo,sha1)
63+
returnget_object_type_by_name(b'commit')(repo,sha1)
6464
# END handle special case
6565
oinfo=repo.odb.info(sha1)
6666
inst=get_object_type_by_name(oinfo.type)(repo,oinfo.binsha)

‎git/test/test_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def test_get_object_type_by_name(self):
8686
assertbase.Objectinget_object_type_by_name(tname).mro()
8787
# END for each known type
8888

89-
assert_raises(ValueError,get_object_type_by_name,"doesntexist")
89+
assert_raises(ValueError,get_object_type_by_name,b"doesntexist")
9090

9191
deftest_object_resolution(self):
9292
# objects must be resolved to shas so they compare equal

‎git/test/test_submodule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def _do_base_tests(self, rwrepo):
8080
assertisinstance(sm.branch_path,string_types)
8181

8282
# some commits earlier we still have a submodule, but its at a different commit
83-
smold=Submodule.iter_items(rwrepo,self.k_subm_changed).next()
83+
smold=next(Submodule.iter_items(rwrepo,self.k_subm_changed))
8484
assertsmold.binsha!=sm.binsha
8585
assertsmold!=sm# the name changed
8686

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp