Skip to content

Commit bb8b82c

Browse files
committed
Run formatter.
1 parent 54284f4 commit bb8b82c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/_view/app.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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

tests/test_functions.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,17 +174,24 @@ async def other_middleware(call_next: CallNext):
174174

175175

176176
async 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

0 commit comments

Comments
 (0)