mirror of
https://github.com/django/django.git
synced 2025-08-30 23:37:50 +00:00
Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.
This commit is contained in:
parent
f909fa84be
commit
b5f0b3478d
27 changed files with 84 additions and 104 deletions
|
@ -49,9 +49,8 @@ Python style
|
|||
|
||||
* In tests, use :meth:`~django.test.SimpleTestCase.assertRaisesMessage` instead
|
||||
of :meth:`~unittest.TestCase.assertRaises` so you can check the exception
|
||||
message. Use :meth:`~unittest.TestCase.assertRaisesRegex`
|
||||
(``six.assertRaisesRegex()`` as long as we support Python 2) only if you need
|
||||
to use regular expression matching.
|
||||
message. Use :meth:`~unittest.TestCase.assertRaisesRegex` only if you need
|
||||
regular expression matching.
|
||||
|
||||
* In test docstrings, state the expected behavior that each test demonstrates.
|
||||
Don't include preambles such as "Tests that" or "Ensures that".
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue