From 605f8785db26c3acdde90cfd4ecebb208362a1b8 Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora <80244920+Eclips4@users.noreply.github.com> Date: Tue, 2 May 2023 01:14:49 +0300 Subject: [PATCH] gh-104057: Fix direct invocation of test_super (#104064) --- Lib/test/test_super.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_super.py b/Lib/test/test_super.py index ed773a3cff2a6d..698ab48f48eaa1 100644 --- a/Lib/test/test_super.py +++ b/Lib/test/test_super.py @@ -359,7 +359,7 @@ class C: def method(self): 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") def test_shadowed_dynamic_two_arg(self): @@ -373,7 +373,7 @@ class C: def method(self): 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(call_args, [(1, 2)])