2323# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
2424# Boston, MA 02110-1301, USA.
2525
26- from unittest .mock import patch
2726import sys
2827
2928import pytest
@@ -50,7 +49,7 @@ def test_remote_create(testrepo):
5049
5150 remote = testrepo .remotes .create (name , url )
5251
53- assert type (remote ) == pygit2 .Remote
52+ assert type (remote ) is pygit2 .Remote
5453 assert name == remote .name
5554 assert url == remote .url
5655 assert remote .push_url is None
@@ -66,7 +65,7 @@ def test_remote_create_with_refspec(testrepo):
6665
6766 remote = testrepo .remotes .create (name , url , fetch )
6867
69- assert type (remote ) == pygit2 .Remote
68+ assert type (remote ) is pygit2 .Remote
7069 assert name == remote .name
7170 assert url == remote .url
7271 assert [fetch ] == remote .fetch_refspecs
@@ -140,7 +139,7 @@ def test_refspec(testrepo):
140139 assert refspec .force is True
141140 assert ORIGIN_REFSPEC == refspec .string
142141
143- assert list == type (remote .fetch_refspecs )
142+ assert list is type (remote .fetch_refspecs )
144143 assert 1 == len (remote .fetch_refspecs )
145144 assert ORIGIN_REFSPEC == remote .fetch_refspecs [0 ]
146145
@@ -149,18 +148,18 @@ def test_refspec(testrepo):
149148 assert 'refs/remotes/origin/master' == refspec .transform ('refs/heads/master' )
150149 assert 'refs/heads/master' == refspec .rtransform ('refs/remotes/origin/master' )
151150
152- assert list == type (remote .push_refspecs )
151+ assert list is type (remote .push_refspecs )
153152 assert 0 == len (remote .push_refspecs )
154153
155154 push_specs = remote .push_refspecs
156- assert list == type (push_specs )
155+ assert list is type (push_specs )
157156 assert 0 == len (push_specs )
158157
159158 testrepo .remotes .add_fetch ('origin' , '+refs/test/*:refs/test/remotes/*' )
160159 remote = testrepo .remotes ['origin' ]
161160
162161 fetch_specs = remote .fetch_refspecs
163- assert list == type (fetch_specs )
162+ assert list is type (fetch_specs )
164163 assert 2 == len (fetch_specs )
165164 assert [
166165 '+refs/heads/*:refs/remotes/origin/*' ,
0 commit comments