From: Serhiy Storchaka Date: Mon, 28 Jan 2013 11:26:25 +0000 (+0200) Subject: Fix skip conditions in some docstings tests. X-Git-Tag: v3.3.1rc1~278 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4fdd599e25f703259c42c2b74d0a6316875bfcf;p=thirdparty%2FPython%2Fcpython.git Fix skip conditions in some docstings tests. --- a4fdd599e25f703259c42c2b74d0a6316875bfcf diff --cc Lib/test/test_functools.py index 47b3df80d4b8,4708381f3f9e..35e39b528fd2 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@@ -313,18 -310,17 +313,18 @@@ class TestWraps(TestUpdateWrapper) def wrapper(): pass self.check_wrapper(wrapper, f) - return wrapper + return wrapper, f def test_default_update(self): - wrapper = self._default_update() + wrapper, f = self._default_update() self.assertEqual(wrapper.__name__, 'f') + self.assertEqual(wrapper.__qualname__, f.__qualname__) 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() + wrapper, _ = self._default_update() self.assertEqual(wrapper.__doc__, 'This is a test') def test_no_update(self):