File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1194,7 +1194,6 @@ register_error(ViewApp *self, PyObject *args)
11941194 }
11951195
11961196 self -> error_type = Py_NewRef (type );
1197- printf ("a self->error_type: %p\n" , self -> error_type );
11981197 Py_RETURN_NONE ;
11991198}
12001199
Original file line number Diff line number Diff line change @@ -174,17 +174,24 @@ async def other_middleware(call_next: CallNext):
174174
175175
176176async def test_supports_result_isinstance ():
177+ called = 0
178+
177179 class MyObject (SupportsViewResult ):
178180 async def __view_result__ (self , ctx : Context ) -> MaybeAwaitable [ViewResult ]:
181+ nonlocal called
182+ called += 1
179183 return "hello"
180184
181185 class MyObjectNoInherit :
182186 async def __view_result__ (self , ctx : Context ) -> MaybeAwaitable [ViewResult ]:
187+ nonlocal called
188+ called += 1
183189 return "hello"
184190
185191 assert isinstance (MyObject (), SupportsViewResult )
186192 assert issubclass (MyObject , SupportsViewResult )
187193 assert isinstance (MyObjectNoInherit (), SupportsViewResult )
194+ assert called == 2
188195
189196
190197@pytest .mark .asyncio
You can’t perform that action at this time.
0 commit comments