[Python-checkins] Fix mock code coverage. (#100580)

cjw296 webhook-mailer at python.org
Wed Dec 28 07:36:40 EST 2022


https://github.com/python/cpython/commit/457c1f4a19a096a52d6553687c7c4cee415818dc
commit: 457c1f4a19a096a52d6553687c7c4cee415818dc
branch: main
author: Chris Withers <chris at withers.org>
committer: cjw296 <chris at withers.org>
date: 2022年12月28日T12:36:26Z
summary:
Fix mock code coverage. (#100580)
files:
M Lib/test/test_unittest/testmock/testsealable.py
diff --git a/Lib/test/test_unittest/testmock/testsealable.py b/Lib/test/test_unittest/testmock/testsealable.py
index e0c38293cffd..8bf98cfa562b 100644
--- a/Lib/test/test_unittest/testmock/testsealable.py
+++ b/Lib/test/test_unittest/testmock/testsealable.py
@@ -175,15 +175,12 @@ def test_seal_with_autospec(self):
 # https://bugs.python.org/issue45156
 class Foo:
 foo = 0
- def bar1(self):
- return 1
- def bar2(self):
- return 2
+ def bar1(self): pass
+ def bar2(self): pass
 
 class Baz:
 baz = 3
- def ban(self):
- return 4
+ def ban(self): pass
 
 for spec_set in (True, False):
 with self.subTest(spec_set=spec_set):


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /