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

Skip to content

Commit a4fdd59

Browse files
Fix skip conditions in some docstings tests.
2 parents 26f1166 + 8e0ae2a commit a4fdd59

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
@@ -321,7 +321,7 @@ def test_default_update(self):
321321
self.assertEqual(wrapper.__qualname__, f.__qualname__)
322322
self.assertEqual(wrapper.attr, 'This is also a test')
323323

324-
@unittest.skipIf(not sys.flags.optimize <= 1,
324+
@unittest.skipIf(sys.flags.optimize >= 2,
325325
"Docstrings are omitted with -O2 and above")
326326
def test_default_update_doc(self):
327327
wrapper, _ = self._default_update()

Lib/test/test_property.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def spam(self):
186186
Foo.spam.__doc__,
187187
"spam wrapped in property subclass")
188188

189-
@unittest.skipIf(sys.flags.optimize <= 2,
189+
@unittest.skipIf(sys.flags.optimize >= 2,
190190
"Docstrings are omitted with -O2 and above")
191191
def test_property_setter_copies_getter_docstring(self):
192192
class Foo(object):
@@ -219,7 +219,7 @@ def spam(self, value):
219219
FooSub.spam.__doc__,
220220
"spam wrapped in property subclass")
221221

222-
@unittest.skipIf(sys.flags.optimize <= 2,
222+
@unittest.skipIf(sys.flags.optimize >= 2,
223223
"Docstrings are omitted with -O2 and above")
224224
def test_property_new_getter_new_docstring(self):
225225

0 commit comments

Comments
 (0)