@@ -58,7 +58,7 @@ def test_plain_decorator() -> None:
5858 def my_func (* args : object , ** kwargs : object ) -> Dict [str , object ]:
5959 return dict (args = args , kwargs = kwargs )
6060
61- assert type (my_func ) == MockClass
61+ assert type (my_func ) is MockClass
6262 _assert_func_decoration (my_func ) # noqa
6363 _assert_call_func (my_func )
6464
@@ -72,7 +72,7 @@ def test_plain_decorator_parentheses() -> None:
7272 def my_func (* args : object , ** kwargs : object ) -> Dict [str , object ]:
7373 return dict (args = args , kwargs = kwargs )
7474
75- assert type (my_func ) == MockClass
75+ assert type (my_func ) is MockClass
7676 _assert_func_decoration (my_func ) # noqa
7777 _assert_call_func (my_func )
7878
@@ -86,7 +86,7 @@ def test_decorator_with_kwargs() -> None:
8686 def my_func (* args : object , ** kwargs : object ) -> Dict [str , object ]:
8787 return dict (args = args , kwargs = kwargs )
8888
89- assert type (my_func ) == MockClass
89+ assert type (my_func ) is MockClass
9090 _assert_func_decoration (my_func ) # noqa
9191 _assert_call_func (my_func )
9292
@@ -100,7 +100,7 @@ def test_decorator_with_args_and_kwargs() -> None:
100100 def my_func (* args : object , ** kwargs : object ) -> Dict [str , object ]:
101101 return dict (args = args , kwargs = kwargs )
102102
103- assert type (my_func ) == MockClass
103+ assert type (my_func ) is MockClass
104104 _assert_func_decoration (my_func ) # noqa
105105 _assert_call_func (my_func )
106106
@@ -117,7 +117,7 @@ def other_func():
117117 def my_func (* args : object , ** kwargs : object ) -> Dict [str , Any ]:
118118 return dict (args = args , kwargs = kwargs )
119119
120- assert type (my_func ) == MockClass
120+ assert type (my_func ) is MockClass
121121 _assert_func_decoration (my_func ) # noqa
122122 _assert_call_func (my_func )
123123
@@ -132,7 +132,7 @@ def test_double_decorator_with_args_and_kwargs() -> None:
132132 def my_func (* args : object , ** kwargs : object ) -> Dict [str , Any ]:
133133 return dict (args = args , kwargs = kwargs )
134134
135- assert type (my_func ) == MockClass
135+ assert type (my_func ) is MockClass
136136 _assert_func_decoration (my_func ) # noqa
137137 _assert_call_func (my_func )
138138
@@ -167,7 +167,7 @@ def my_fancy_func(*args: Union[int, str], **kwargs: bool) -> Dict[str, Any]:
167167def test_decorator_as_function_fancy_func () -> None :
168168 my_func = MockClass (my_fancy_func )
169169
170- assert type (my_func ) == MockClass
170+ assert type (my_func ) is MockClass
171171 _assert_func_decoration (my_func ) # noqa
172172 _assert_call_func (my_func )
173173
@@ -179,7 +179,7 @@ def test_decorator_as_function_fancy_func() -> None:
179179def test_decorator_as_function_fancy_func_args_kwargs () -> None :
180180 my_func = MockClass (123 , True , param = 123 , other = True )(my_fancy_func )
181181
182- assert type (my_func ) == MockClass
182+ assert type (my_func ) is MockClass
183183 _assert_func_decoration (my_func ) # noqa
184184 _assert_call_func (my_func )
185185
@@ -191,7 +191,7 @@ def test_decorator_as_function_fancy_func_args_kwargs() -> None:
191191def test_fail_decorator_as_function_no_args_no_func () -> None :
192192 my_func = MockClass ()
193193
194- assert type (my_func ) == MockClass
194+ assert type (my_func ) is MockClass
195195
196196 with pytest .raises (TypeError ):
197197 my_func () # type: ignore # noqa
@@ -204,7 +204,7 @@ def test_fail_decorator_as_function_no_args_no_func() -> None:
204204def test_fail_decorator_as_function_args_and_kwargs_no_func () -> None :
205205 my_func = MockClass (123 , True , param = 123 , other = True )
206206
207- assert type (my_func ) == MockClass
207+ assert type (my_func ) is MockClass
208208
209209 with pytest .raises (TypeError ):
210210 my_func ()
0 commit comments