mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
gh-104057: Fix direct invocation of test_super (#104064)
This commit is contained in:
parent
80b714835d
commit
605f8785db
1 changed files with 2 additions and 2 deletions
|
@ -359,7 +359,7 @@ class TestSuper(unittest.TestCase):
|
||||||
def method(self):
|
def method(self):
|
||||||
return super().msg
|
return super().msg
|
||||||
|
|
||||||
with patch("test.test_super.super", MySuper) as m:
|
with patch(f"{__name__}.super", MySuper) as m:
|
||||||
self.assertEqual(C().method(), "super super")
|
self.assertEqual(C().method(), "super super")
|
||||||
|
|
||||||
def test_shadowed_dynamic_two_arg(self):
|
def test_shadowed_dynamic_two_arg(self):
|
||||||
|
@ -373,7 +373,7 @@ class TestSuper(unittest.TestCase):
|
||||||
def method(self):
|
def method(self):
|
||||||
return super(1, 2).msg
|
return super(1, 2).msg
|
||||||
|
|
||||||
with patch("test.test_super.super", MySuper) as m:
|
with patch(f"{__name__}.super", MySuper) as m:
|
||||||
self.assertEqual(C().method(), "super super")
|
self.assertEqual(C().method(), "super super")
|
||||||
self.assertEqual(call_args, [(1, 2)])
|
self.assertEqual(call_args, [(1, 2)])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue