diff options
| author | Claude Paroz <claude@2xlibre.net> | 2014-08-23 18:01:33 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2014-08-26 20:03:37 +0200 |
| commit | 5675eb371f8af55569602c2c6c6f275968b1ce3b (patch) | |
| tree | f7cd10b21196561cc2a9b044160780a5d26b2576 /docs | |
| parent | e02f45d5ea767b0028ecf24bb5874992eb3ca7dd (diff) | |
Allowed skipIf/UnlessDBFeature to accept several feature strings
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/testing/tools.txt | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index 7519fb9e63..70cbbdabfe 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -1610,10 +1610,10 @@ features class. See ``django.db.backends.BaseDatabaseFeatures`` class for a full list of database features that can be used as a basis for skipping tests. -.. function:: skipIfDBFeature(feature_name_string) +.. function:: skipIfDBFeature(*feature_name_strings) -Skip the decorated test or ``TestCase`` if the named database feature is -supported. +Skip the decorated test or ``TestCase`` if all of the named database features +are supported. For example, the following test will not be executed if the database supports transactions (e.g., it would *not* run under PostgreSQL, but @@ -1628,10 +1628,14 @@ it would under MySQL with MyISAM tables):: ``skipIfDBFeature`` can now be used to decorate a ``TestCase`` class. -.. function:: skipUnlessDBFeature(feature_name_string) +.. versionchanged:: 1.8 -Skip the decorated test or ``TestCase`` if the named database feature is *not* -supported. + ``skipIfDBFeature`` can accept multiple feature strings. + +.. function:: skipUnlessDBFeature(*feature_name_strings) + +Skip the decorated test or ``TestCase`` if any of the named database features +are *not* supported. For example, the following test will only be executed if the database supports transactions (e.g., it would run under PostgreSQL, but *not* @@ -1645,3 +1649,7 @@ under MySQL with MyISAM tables):: .. versionchanged:: 1.7 ``skipUnlessDBFeature`` can now be used to decorate a ``TestCase`` class. + +.. versionchanged:: 1.8 + + ``skipUnlessDBFeature`` can accept multiple feature strings. |
