Skip to content

Commit

Permalink
Removed django.utils.unittest per deprecation timeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
timgraham committed Jan 17, 2015
1 parent ce78b95 commit b952c3f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 29 deletions.
13 changes: 0 additions & 13 deletions django/utils/unittest.py

This file was deleted.

14 changes: 0 additions & 14 deletions docs/topics/testing/overview.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,6 @@ Writing tests
Django's unit tests use a Python standard library module: :mod:`unittest`. This
module defines tests using a class-based approach.

.. admonition:: unittest2

.. deprecated:: 1.7

Python 2.7 introduced some major changes to the ``unittest`` library,
adding some extremely useful features. To ensure that every Django project
could benefit from these new features, Django used to ship with a copy of
Python 2.7's ``unittest`` backported for Python 2.6 compatibility.

Since Django no longer supports Python versions older than 2.7,
``django.utils.unittest`` is deprecated. Simply use ``unittest``.

.. _unittest2: https://pypi.python.org/pypi/unittest2

Here is an example which subclasses from :class:`django.test.TestCase`,
which is a subclass of :class:`unittest.TestCase` that runs each test inside a
transaction to provide isolation::
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ doc_files = docs extras AUTHORS INSTALL LICENSE README.rst
install-script = scripts/rpm-install.sh

[flake8]
exclude=build,.git,./django/utils/unittest.py,./django/utils/lru_cache.py,./django/utils/six.py,./django/conf/app_template/*,./django/dispatch/weakref_backports.py,./tests/.env,./xmlrunner,./tests/test_*.py
exclude=build,.git,./django/utils/lru_cache.py,./django/utils/six.py,./django/conf/app_template/*,./django/dispatch/weakref_backports.py,./tests/.env,./xmlrunner,./tests/test_*.py
ignore=E123,E128,E265,E501,W601
max-line-length = 119

Expand Down
2 changes: 1 addition & 1 deletion tests/.coveragerc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[run]
omit = */django/contrib/*/tests*,*/django/utils/unittest*,*/django/core/servers/fastcgi.py,*/django/utils/autoreload.py
omit = */django/contrib/*/tests*,*/django/core/servers/fastcgi.py,*/django/utils/autoreload.py

[report]
ignore_errors = True
Expand Down

0 comments on commit b952c3f

Please sign in to comment.