mirror of https://github.com/python/cpython
Fix skip conditions in some docstings tests.
This commit is contained in:
parent
d7797c6e7a
commit
80a0a1e170
|
@ -259,7 +259,7 @@ class TestWraps(TestUpdateWrapper):
|
|||
self.assertEqual(wrapper.__name__, 'f')
|
||||
self.assertEqual(wrapper.attr, 'This is also a test')
|
||||
|
||||
@unittest.skipIf(not sys.flags.optimize <= 1,
|
||||
@unittest.skipIf(sys.flags.optimize >= 2,
|
||||
"Docstrings are omitted with -O2 and above")
|
||||
def test_default_update_doc(self):
|
||||
wrapper = self._default_update()
|
||||
|
|
|
@ -163,7 +163,7 @@ class PropertySubclassTests(unittest.TestCase):
|
|||
Foo.spam.__doc__,
|
||||
"spam wrapped in property subclass")
|
||||
|
||||
@unittest.skipIf(sys.flags.optimize <= 2,
|
||||
@unittest.skipIf(sys.flags.optimize >= 2,
|
||||
"Docstrings are omitted with -O2 and above")
|
||||
def test_property_setter_copies_getter_docstring(self):
|
||||
class Foo(object):
|
||||
|
@ -196,7 +196,7 @@ class PropertySubclassTests(unittest.TestCase):
|
|||
FooSub.spam.__doc__,
|
||||
"spam wrapped in property subclass")
|
||||
|
||||
@unittest.skipIf(sys.flags.optimize <= 2,
|
||||
@unittest.skipIf(sys.flags.optimize >= 2,
|
||||
"Docstrings are omitted with -O2 and above")
|
||||
def test_property_new_getter_new_docstring(self):
|
||||
|
||||
|
|
Loading…
Reference in New Issue