mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
fix up mock tests coverage (#100874)
This commit is contained in:
parent
0cd597fef1
commit
4e544eafcb
1 changed files with 4 additions and 8 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue