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

Commite54277f

Browse files
committed
Compare types in test_orig_head with "is"
This performs an exact type comparison with "is" instead of "==".Most (maybe all?) of the rest of the places where "==" was usedhave been changed previously, but this on fell through the cracks.Like the None object, type objects use reference-based equalitycomparison, and the idiomatic ways to check against them are "is"for exactly comparisons and isinstance/issubclass otherwise.
1 parent86fcb1b commite54277f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎test/test_refs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def test_is_valid(self):
207207
assertnotSymbolicReference(self.rorepo,"hellothere").is_valid()
208208

209209
deftest_orig_head(self):
210-
asserttype(self.rorepo.head.orig_head())==SymbolicReference
210+
asserttype(self.rorepo.head.orig_head())isSymbolicReference
211211

212212
@with_rw_repo("0.1.6")
213213
deftest_head_checkout_detached_head(self,rw_repo):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp