Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8e0ae2a

Browse files
Fix skip conditions in some docstings tests.
1 parent 9d0add0 commit 8e0ae2a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/test/test_functools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def test_default_update(self):
317317
self.assertEqual(wrapper.__name__, 'f')
318318
self.assertEqual(wrapper.attr, 'This is also a test')
319319

320-
@unittest.skipIf(not sys.flags.optimize <= 1,
320+
@unittest.skipIf(sys.flags.optimize >= 2,
321321
"Docstrings are omitted with -O2 and above")
322322
def test_default_update_doc(self):
323323
wrapper = self._default_update()

Lib/test/test_property.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def spam(self):
163163
Foo.spam.__doc__,
164164
"spam wrapped in property subclass")
165165

166-
@unittest.skipIf(sys.flags.optimize <= 2,
166+
@unittest.skipIf(sys.flags.optimize >= 2,
167167
"Docstrings are omitted with -O2 and above")
168168
def test_property_setter_copies_getter_docstring(self):
169169
class Foo(object):
@@ -196,7 +196,7 @@ def spam(self, value):
196196
FooSub.spam.__doc__,
197197
"spam wrapped in property subclass")
198198

199-
@unittest.skipIf(sys.flags.optimize <= 2,
199+
@unittest.skipIf(sys.flags.optimize >= 2,
200200
"Docstrings are omitted with -O2 and above")
201201
def test_property_new_getter_new_docstring(self):
202202

0 commit comments

Comments
 (0)