]> granicus.if.org Git - python/commitdiff
Fix skip conditions in some docstings tests.
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 28 Jan 2013 11:25:44 +0000 (13:25 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 28 Jan 2013 11:25:44 +0000 (13:25 +0200)
Lib/test/test_functools.py
Lib/test/test_property.py

index 10868f3d1543b68d0c2509c2b6528e885bd946c1..4708381f3f9e2a14807c4a922c5ab8bd87e3b827 100644 (file)
@@ -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()
index cc6a872179c339571067fbc5760e052b60c93d7e..b58270f294476597d4fbf02d22a9dd5c6296cc74 100644 (file)
@@ -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):