Changeset 5393
- Timestamp:
- 05/31/07 11:09:49 (1 year ago)
- Files:
-
- django/branches/boulder-oracle-sprint/django/template/defaulttags.py (modified) (2 diffs)
- django/branches/boulder-oracle-sprint/django/test/_doctest.py (copied) (copied from django/trunk/django/test/_doctest.py)
- django/branches/boulder-oracle-sprint/django/test/doctest.py (deleted)
- django/branches/boulder-oracle-sprint/django/test/simple.py (modified) (1 diff)
- django/branches/boulder-oracle-sprint/django/test/testcases.py (modified) (1 diff)
- django/branches/boulder-oracle-sprint/docs/testing.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/boulder-oracle-sprint/django/template/defaulttags.py
r5100 r5393 238 238 output = [] # list of dictionaries in the format {'grouper': 'key', 'list': [list of contents]} 239 239 for obj in obj_list: 240 grouper = self.expression.resolve( Context({'var': obj}), True)240 grouper = self.expression.resolve(obj, True) 241 241 # TODO: Is this a sensible way to determine equality? 242 242 if output and repr(output[-1]['grouper']) == repr(grouper): … … 848 848 raise TemplateSyntaxError, "next-to-last argument to 'regroup' tag must be 'as'" 849 849 850 expression = parser.compile_filter( 'var.%s' %lastbits_reversed[2][::-1])850 expression = parser.compile_filter(lastbits_reversed[2][::-1]) 851 851 852 852 var_name = lastbits_reversed[0][::-1] django/branches/boulder-oracle-sprint/django/test/simple.py
r5183 r5393 1 import unittest , doctest1 import unittest 2 2 from django.conf import settings 3 from django.test import _doctest as doctest 3 4 from django.test.utils import setup_test_environment, teardown_test_environment 4 5 from django.test.utils import create_test_db, destroy_test_db django/branches/boulder-oracle-sprint/django/test/testcases.py
r5235 r5393 1 import re, doctest,unittest1 import re, unittest 2 2 from urlparse import urlparse 3 3 from django.db import transaction 4 4 from django.core import management, mail 5 5 from django.db.models import get_apps 6 from django.test import _doctest as doctest 6 7 from django.test.client import Client 7 8 django/branches/boulder-oracle-sprint/docs/testing.txt
r5384 r5393 148 148 "pythonic". It's designed to make writing tests as easy as possible, so 149 149 there's no overhead of writing classes or methods; you simply put tests in 150 docstrings. This gives the added advantage of giv enyour modules automatic150 docstrings. This gives the added advantage of giving your modules automatic 151 151 documentation -- well-written doctests can kill both the documentation and the 152 152 testing bird with a single stone.
