Skip to content

Commit

Permalink
Updated test failure example.
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiro committed May 12, 2013
1 parent 2c62a50 commit 956973c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/index.txt
Expand Up @@ -185,7 +185,7 @@ testing of Django applications:
* **Testing:** * **Testing:**
:doc:`Introduction <topics/testing/index>` | :doc:`Introduction <topics/testing/index>` |
:doc:`Writing and running tests <topics/testing/overview>` | :doc:`Writing and running tests <topics/testing/overview>` |
:doc:`Advanced topics <topics/testing/advanced>` | :doc:`Advanced topics <topics/testing/advanced>`


* **Deployment:** * **Deployment:**
:doc:`Overview <howto/deployment/index>` | :doc:`Overview <howto/deployment/index>` |
Expand Down
20 changes: 5 additions & 15 deletions docs/topics/testing/overview.txt
Expand Up @@ -280,25 +280,15 @@ If there are test failures, however, you'll see full details about which tests
failed:: failed::


====================================================================== ======================================================================
FAIL: Doctest: ellington.core.throttle.models FAIL: test_was_published_recently_with_future_poll (polls.tests.PollMethodTests)
---------------------------------------------------------------------- ----------------------------------------------------------------------
Traceback (most recent call last): Traceback (most recent call last):
File "/dev/django/test/doctest.py", line 2153, in runTest File "/dev/mysite/polls/tests.py", line 16, in test_was_published_recently_with_future_poll
raise self.failureException(self.format_failure(new.getvalue())) self.assertEqual(future_poll.was_published_recently(), False)
AssertionError: Failed doctest test for myapp.models AssertionError: True != False
File "/dev/myapp/models.py", line 0, in models


---------------------------------------------------------------------- ----------------------------------------------------------------------
File "/dev/myapp/models.py", line 14, in myapp.models Ran 1 test in 0.003s
Failed example:
throttle.check("actor A", "action one", limit=2, hours=1)
Expected:
True
Got:
False

----------------------------------------------------------------------
Ran 2 tests in 0.048s


FAILED (failures=1) FAILED (failures=1)


Expand Down

0 comments on commit 956973c

Please sign in to comment.