From 3a10bcc91726859f9f0f817b39586712c2d37c2b Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Fri, 7 Sep 2012 15:51:22 -0400 Subject: [PATCH] Document ``six.assertRaisesRegex``. --- docs/topics/python3.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/topics/python3.txt b/docs/topics/python3.txt index d816db8046..89d0c9f91f 100644 --- a/docs/topics/python3.txt +++ b/docs/topics/python3.txt @@ -400,5 +400,12 @@ The version of six bundled with Django includes one extra function: 2 and :meth:`~django.utils.datastructures.MultiValueDict.lists()` on Python 3. +.. function:: assertRaisesRegex(testcase, *args, **kwargs) + + This replaces ``testcase.assertRaisesRegexp`` on Python 2, and + ``testcase.assertRaisesRegex`` on Python 3. ``assertRaisesRegexp`` still + exists in current Python3 versions, but issues a warning. + + In addition to six' defaults moves, Django's version provides ``thread`` as ``_thread`` and ``dummy_thread`` as ``_dummy_thread``.