From 7233acc5c516125e46828a033c5f847d9af05ef0 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 29 Mar 2009 03:31:40 +0000 Subject: stop the versionchanged directive from hiding the docs --- Doc/library/unittest.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 0aa55a6..fb5bb86 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -672,13 +672,15 @@ Test cases To catch any of a group of exceptions, a tuple containing the exception classes may be passed as *exception*. - .. versionchanged:: 2.7 + If *callable* is omitted or None, returns a context manager so that the + code under test can be written inline rather than as a function:: + + with self.failUnlessRaises(some_error_class): + do_something() - If *callable* is omitted or None, returns a context manager so that the - code under test can be written inline rather than as a function:: + .. versionchanged:: 2.7 + Added the ability to use :meth:`assertRaises` as a context manager. - with self.failUnlessRaises(some_error_class): - do_something() .. method:: failIf(expr[, msg]) assertFalse(expr[, msg]) -- cgit v0.12 Qt s a cross-platform application framework that is used for developing application software that can be run on various software and hardware platforms with little or no change in the underlying codebase, while still being a native application with native capabilities and speed.
summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix checking QT_NO_QWS_MULTIPROCESS before using QWSSharedMemSurfacePasi Petäjäjärvi2013-01-241-0/+4
| | | | | | | | | QWSSharedMemSurface is not available if we don't have multiprocess QWS, which requires QSharedMemory support. On VxWorks DKM mode, we don't support QSharedMemory and there no multiprocess QWS. Change-Id: I647a576ee4d718b3dcddb0dc4d629ffcd2e163f2 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix TextInput test failures.Andrew den Exter2013-01-232-6/+14
| | | | | | | | | | | | | | | | emitCursorPositionChanged won't emit cursorPositionChanged if the cursor position hasn't changed but that doesn't mean the micro focus hasn't changed, so emit updateMicroFocus changed when cursorPositionChanged isn't. Task-number: QTBUG-21017 Task-number: QTBUG-21011 Task-number: QTBUG-20719 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> (cherry picked from commit 6e0e834e0398192a6da11d1e1bca6b74769fb75d) Change-Id: Ia0d244eea051f2a870a084742c4c22f5a45a87bc Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Doc: Updated HTML copyright year to 2013.Jerome Pasion2013-01-2212-12/+12
| | | | | | Change-Id: I62fa2443cc7cfd187458eb99d370472d553600f8 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Johanna Äijälä <johanna.aijala@digia.com>
* Don't update the input method if the im hints haven't changed.Andrew den Exter2013-01-221-0/+2
| | | | | | | | | | | | | | | | | Depending on the implementation updating an input method can be expensive and various widgets will at times call setInputMethodHints with unchanged hints. QGraphicsView being a notable offender due to the complexity of the circumstances in which the hints can change. Skipping the update here ensures the input method isn't updated unnecessarily for all widgets. Task-number: QTBUG-19854 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> (cherry picked from commit 40e6b1d0b8c1804dfb33032fa70b6604b91f6f90) Change-Id: I36ae35585ee20a4e01ca0d62c71e896dbdb51a3f Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix glitch on MNG animation Loops when QMovie caching is enabledDavy Durham2013-01-221-0/+8
| | | | | | | | | | | | libmng delivers the last animation frame with a 1ms delay, and delivers an extra blank frame after that with the proper delay time, but this confuses QMovie when QMovie::cacheMode() == QMovie::CacheAll. This was commited as 313d60c107d9659efd5e93ba5a036054f6b1ebba in qt5 Task-Number: QTBUG-28894 Change-Id: I1dd585cd6f0ced8c777bd1f15ac2c9f36ca63f41 Reviewed-by: aavit <eirik.aavitsland@digia.com>
* Removed unused include headers <time.h> and <sys/time.h>Pasi Petäjäjärvi2013-01-221-5/+0
| | | | | | | | Nothing is used from the above header files so these dead includes can be removed. Change-Id: I381ea62e5a0bc623bb984c764be55c7a2f2ee317 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix temporary file leak in tst_qfileinfo.Friedemann Kleint2013-01-211-4/+3
| | | | | | Change-Id: I0d679638d5a9564f612ae5e70717f164b74aefb0 Reviewed-by: David Faure (KDE) <faure@kde.org> (cherry picked from qtbase/52e14e05fa83f19f64cedda2291b3a055bdead06)
* Qt Designer: Use multiline validation for dynamic string properties.Friedemann Kleint2013-01-211-0/+20
| | | | | | | | Task-number: QTBUG-26394 Change-Id: Idbaa4bad71125b74d8407bb56ee9fdbf83831fe0 Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com> (cherry picked from qttools/a7d61534acdb90b925d7f250665dcd30c3f37668)
* ActiveQt Designer plugin: Load control string correctly.Friedemann Kleint2013-01-211-1/+3
| | | | | | | | Task-number: QTBUG-29234 Change-Id: I5762c75efc24bf5322ff767a9dbecfdfc02c3377 Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com> (cherry picked from qttools/8695c1753964eeb06b5d9306010b56be5fc151c0)
* To support QT_NO_IM on Linux/Windows/MacJing Bai2013-01-2123-34/+117
| | | | | | | | | | Fix compilation issue when QT_NO_IM is defined. Also fixed references in tests. But fixing plugins/examples seem not necessary at this point. Task-number: QTBUG-26109 Change-Id: I2067051951616012117efa6716640cbf198fdb2a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* fix illegal reference to a destroyed variableGatis Paeglis2013-01-201-1/+1
| | | | | | | | | | | | | The char array 'dash_o' is an automatic variable. The string "-o" is copied into this array. Later the address of the array dash_o is assigned twice to lpargs[++i]. After leaving the block, the array dash_o is gone and lpargs[...] contains an illegal reference. This was discovered in a release mode when compiled with gcc version 4.7.2 Patch doesn't apply for Qt5 where 'lpr' support has been removed. Change-Id: I4f99badfa380ad3b29893a350f0d699bfb934c68 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix a -Wunused-private-field] warningJan Kundrát2013-01-201-0/+5
| | | | | | | | | | | | | ABI compatibility dictates that these members cannot go. On the other hand, new Clang warns about these being unused. Konstantin Tokarev suggested adding Q_UNUSED to any method; this one looks as good as the other one. Change-Id: Icfb47bff7662d1f31f191a702416983776ce42e3 Reviewed-by: Konstantin Tokarev <annulen@yandex.ru> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Fix crashes in tst_qthreadpool on Windows.Friedemann Kleint2013-01-181-6/+28
| | | | | | | | | | | | Qt 4.8 shows frequent crashes in runMultiple apparently caused by the QMutex construction in the free functions by different threads. Use a common QMutex class member instead. Change-Id: I851d4e2d3637a7b4f404ed843f5360c10caa21f5 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from qtbase/ced523af7a3559b0f30dd2a4406e05418ff7ec89)
* Update the Indonisian and Catalan locales in CLDR data:Mehdi Fekari2013-01-184-215/+562
| | | | | | | | - Indonisian locale (in.xml): to return correct AM/PM text and correct time Fomat - Catalan locale (ca.xml): to return correct time Format Change-Id: I65bbabdc6311dc3c958605cbc04e7a034243e9db Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QTBUG-15319: fix shortcuts with secondary Xkb layout.Aurelien Lourot2013-01-181-1/+4
| | | | | | | Change-Id: Iadb89137ec017b9dcd4d1588fd582ea46a9d7cc1 Reviewed-by: Aurelien <aurelien.lourot@gmail.com> Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QtDBus: Garbage collect deleted objects now and then.David Faure2013-01-181-0/+17
| | | | | | | | | Fixes performance issues in apps which register and deregister objects very frequently (like nepomukstorage). Change-Id: Id7d6ef508336758c55fa894868241f143b3e30e0 Backport-Of: ac9ab9703ff299c94dca7585d5a12ecde28931bb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change all shmget calls to user-only memoryThiago Macieira2013-01-18