aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Withers <chris@withers.org>2023-01-09 10:08:56 +0000
committerGitHub <noreply@github.com>2023-01-09 10:08:56 +0000
commit4e544eafcb603babe0db01270bd1c6d5d0f5d6ea (patch)
treebe7a4168025a5d296fd8de2c0f274090fc493da6
parentgh-100764: add `pycore_frame.h` to PYTHON_HEADERS and Windows build files(#10... (diff)
downloadcpython-4e544eafcb603babe0db01270bd1c6d5d0f5d6ea.tar.gz
cpython-4e544eafcb603babe0db01270bd1c6d5d0f5d6ea.tar.bz2
cpython-4e544eafcb603babe0db01270bd1c6d5d0f5d6ea.zip
fix up mock tests coverage (#100874)
-rw-r--r--Lib/test/test_unittest/testmock/testmock.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/test/test_unittest/testmock/testmock.py b/Lib/test/test_unittest/testmock/testmock.py
index 97fe66fa4ca..d1cae47a40e 100644
--- a/Lib/test/test_unittest/testmock/testmock.py
+++ b/Lib/test/test_unittest/testmock/testmock.py
@@ -1653,11 +1653,9 @@ class MockTest(unittest.TestCase):
m.has_calls()
class Foo(object):
- def called_once(self):
- pass
+ def called_once(self): pass
- def has_calls(self):
- pass
+ def has_calls(self): pass
m = Mock(spec=Foo)
m.called_once()
@@ -1679,11 +1677,9 @@ class MockTest(unittest.TestCase):
# gh-100739
def test_mock_safe_with_spec(self):
class Foo(object):
- def assert_bar(self):
- pass
+ def assert_bar(self): pass
- def assertSome(self):
- pass
+ def assertSome(self): pass
m = Mock(spec=Foo)
m.assert_bar()