Fix skip conditions in some docstings tests.
This commit is contained in:
commit
a4fdd599e2
|
@ -321,7 +321,7 @@ class TestWraps(TestUpdateWrapper):
|
||||||
self.assertEqual(wrapper.__qualname__, f.__qualname__)
|
self.assertEqual(wrapper.__qualname__, f.__qualname__)
|
||||||
self.assertEqual(wrapper.attr, 'This is also a test')
|
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")
|
"Docstrings are omitted with -O2 and above")
|
||||||
def test_default_update_doc(self):
|
def test_default_update_doc(self):
|
||||||
wrapper, _ = self._default_update()
|
wrapper, _ = self._default_update()
|
||||||
|
|
|
@ -186,7 +186,7 @@ class PropertySubclassTests(unittest.TestCase):
|
||||||
Foo.spam.__doc__,
|
Foo.spam.__doc__,
|
||||||
"spam wrapped in property subclass")
|
"spam wrapped in property subclass")
|
||||||
|
|
||||||
@unittest.skipIf(sys.flags.optimize <= 2,
|
@unittest.skipIf(sys.flags.optimize >= 2,
|
||||||
"Docstrings are omitted with -O2 and above")
|
"Docstrings are omitted with -O2 and above")
|
||||||
def test_property_setter_copies_getter_docstring(self):
|
def test_property_setter_copies_getter_docstring(self):
|
||||||
class Foo(object):
|
class Foo(object):
|
||||||
|
@ -219,7 +219,7 @@ class PropertySubclassTests(unittest.TestCase):
|
||||||
FooSub.spam.__doc__,
|
FooSub.spam.__doc__,
|
||||||
"spam wrapped in property subclass")
|
"spam wrapped in property subclass")
|
||||||
|
|
||||||
@unittest.skipIf(sys.flags.optimize <= 2,
|
@unittest.skipIf(sys.flags.optimize >= 2,
|
||||||
"Docstrings are omitted with -O2 and above")
|
"Docstrings are omitted with -O2 and above")
|
||||||
def test_property_new_getter_new_docstring(self):
|
def test_property_new_getter_new_docstring(self):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue