Kaydet (Commit) 032f5a78 authored tarafından Tim Graham's avatar Tim Graham

Refs #25735 -- Made @tag decorator importable from django.test.

üst 375e1cfe
...@@ -9,14 +9,14 @@ from django.test.testcases import ( ...@@ -9,14 +9,14 @@ from django.test.testcases import (
) )
from django.test.utils import ( from django.test.utils import (
ignore_warnings, modify_settings, override_settings, ignore_warnings, modify_settings, override_settings,
override_system_checks, override_system_checks, tag,
) )
__all__ = [ __all__ = [
'Client', 'RequestFactory', 'TestCase', 'TransactionTestCase', 'Client', 'RequestFactory', 'TestCase', 'TransactionTestCase',
'SimpleTestCase', 'LiveServerTestCase', 'skipIfDBFeature', 'SimpleTestCase', 'LiveServerTestCase', 'skipIfDBFeature',
'skipUnlessAnyDBFeature', 'skipUnlessDBFeature', 'ignore_warnings', 'skipUnlessAnyDBFeature', 'skipUnlessDBFeature', 'ignore_warnings',
'modify_settings', 'override_settings', 'override_system_checks' 'modify_settings', 'override_settings', 'override_system_checks', 'tag',
] ]
# To simplify Django's test suite; not meant as a public API # To simplify Django's test suite; not meant as a public API
......
...@@ -1632,7 +1632,7 @@ Tagging tests ...@@ -1632,7 +1632,7 @@ Tagging tests
You can tag your tests so you can easily run a particular subset. For example, You can tag your tests so you can easily run a particular subset. For example,
you might label fast or slow tests:: you might label fast or slow tests::
from django.test.utils import tag from django.test import tag
class SampleTestCase(TestCase): class SampleTestCase(TestCase):
......
import doctest import doctest
from unittest import TestCase from unittest import TestCase
from django.test import SimpleTestCase, TestCase as DjangoTestCase from django.test import SimpleTestCase, TestCase as DjangoTestCase, tag
from django.test.utils import tag
from . import doctests from . import doctests
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment