Skip to content

Commit b080375

Browse files
JayBazuzisusanfungblade290
committed
! B support for IsolatedAsyncioTestCase
fixes #239 Co-Authored-By: Susan Fung <38925660+susanfung@users.noreply.github.com> Co-Authored-By: Joss Hufnagel <43077216+blade290@users.noreply.github.com>
1 parent 42dad2e commit b080375

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

approvaltests/namer/stack_frame_namer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ def is_unittest_test(frame: FrameInfo) -> bool:
7676
and "_testMethodName" in vars(local_attributes["self"])
7777
and method_name != "__call__"
7878
and method_name != "_callTestMethod"
79+
and method_name != "_callMaybeAsync"
80+
and method_name != "_asyncioLoopRunner"
7981
and method_name != "run"
8082
)
8183
return is_unittest_test
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
something

tests/test_isolated_asyncio_test_case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ async def test_namer_finds_correct_class_name(self) -> None:
1212
namer = StackFrameNamer()
1313
self.assertEqual("TestIsolatedAsyncioTestCase", namer.get_class_name())
1414

15-
async def test_example(self):
15+
async def test_example(self) -> None:
1616
verify("something")
1717

0 commit comments

Comments
 (0)