Skip to content

Commit 605f878

Browse files
authored
gh-104057: Fix direct invocation of test_super (#104064)
1 parent 80b7148 commit 605f878

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_super.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ class C:
359359
def method(self):
360360
return super().msg
361361

362-
with patch("test.test_super.super", MySuper) as m:
362+
with patch(f"{__name__}.super", MySuper) as m:
363363
self.assertEqual(C().method(), "super super")
364364

365365
def test_shadowed_dynamic_two_arg(self):
@@ -373,7 +373,7 @@ class C:
373373
def method(self):
374374
return super(1, 2).msg
375375

376-
with patch("test.test_super.super", MySuper) as m:
376+
with patch(f"{__name__}.super", MySuper) as m:
377377
self.assertEqual(C().method(), "super super")
378378
self.assertEqual(call_args, [(1, 2)])
379379

0 commit comments

Comments
 (0)