diff options
| author | Claude Paroz <claude@2xlibre.net> | 2013-07-19 20:30:14 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2013-07-19 20:30:14 +0200 |
| commit | 6d52844b9b3c0bd18eea03ac9dc499782b84c36b (patch) | |
| tree | 8df4e2609d5fc8b1b1ea68ff422d90e776693e8c /docs | |
| parent | a269ea4fe0a9a7195f1bd8bf5d462f48c226d525 (diff) | |
Fixed #18551 -- Enabled skipIfDBFeature/skipUnlessDBFeature to decorate a class
Thanks Tim Graham for the review and improved patch.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/testing/overview.txt | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/docs/topics/testing/overview.txt b/docs/topics/testing/overview.txt index 73f2daa294..0380d6931b 100644 --- a/docs/topics/testing/overview.txt +++ b/docs/topics/testing/overview.txt @@ -1804,7 +1804,8 @@ for skipping tests. .. function:: skipIfDBFeature(feature_name_string) -Skip the decorated test if the named database feature is supported. +Skip the decorated test or ``TestCase`` if the named database feature is +supported. For example, the following test will not be executed if the database supports transactions (e.g., it would *not* run under PostgreSQL, but @@ -1815,9 +1816,13 @@ it would under MySQL with MyISAM tables):: def test_transaction_behavior(self): # ... conditional test code +.. versionchanged:: 1.7 + + ``skipIfDBFeature`` can now be used to decorate a ``TestCase`` class. + .. function:: skipUnlessDBFeature(feature_name_string) -Skip the decorated test if the named database feature is *not* +Skip the decorated test or ``TestCase`` if the named database feature is *not* supported. For example, the following test will only be executed if the database @@ -1828,3 +1833,7 @@ under MySQL with MyISAM tables):: @skipUnlessDBFeature('supports_transactions') def test_transaction_behavior(self): # ... conditional test code + +.. versionchanged:: 1.7 + + ``skipUnlessDBFeature`` can now be used to decorate a ``TestCase`` class. |
