From: Serhiy Storchaka Date: Mon, 28 Jan 2013 11:25:44 +0000 (+0200) Subject: Fix skip conditions in some docstings tests. X-Git-Tag: v3.3.1rc1~278^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e0ae2a4f08bc01b18ba46cbebab78ac9f0c00a6;p=python Fix skip conditions in some docstings tests. --- diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index 10868f3d15..4708381f3f 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -317,7 +317,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() diff --git a/Lib/test/test_property.py b/Lib/test/test_property.py index cc6a872179..b58270f294 100644 --- a/Lib/test/test_property.py +++ b/Lib/test/test_property.py @@ -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):