summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/test/testmock/testmock.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/unittest/test/testmock/testmock.py')
-rw-r--r--Lib/unittest/test/testmock/testmock.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/unittest/test/testmock/testmock.py b/Lib/unittest/test/testmock/testmock.py
index 70f19d3..23675b9 100644
--- a/Lib/unittest/test/testmock/testmock.py
+++ b/Lib/unittest/test/testmock/testmock.py
@@ -1182,6 +1182,10 @@ class MockTest(unittest.TestCase):
func.mock_calls, [call(1, 2), call(3, 4)]
)
+ #Issue21222
+ def test_create_autospec_with_name(self):
+ m = mock.create_autospec(object(), name='sweet_func')
+ self.assertIn('sweet_func', repr(m))
def test_mock_add_spec(self):
class _One(object):