On Thu, Apr 28, 2011 at 6:18 PM, Margie Roginski
<margierogin...@yahoo.com>wrote:

>
> I have a bit of time on my hands and was going to run through your
> book to cement my understanding of the best way to test.  I started
> out and was immediately confronted with the fact that there seem to be
> some differences between django 1.1 and django 1.2 in terms of
> testing. At a minimum, it seems that tests.py doesn't get even get
> created by startapp anymore!
>
>
No, the sample tests.py file is still created in by startapp in Django 1.2,
1.3, and current trunk code. That hasn't changed since it was added (we were
remarking at the office a week or so ago that Django devs are going to be
the first to know if and when 1+1 no longer equals 2). What exactly led you
to the conclusion that tests.py is no longer created by 1.2?

Going forward to 1.3, there is a difference in the tests.py file created:
the sample tests file no longer contains a doctest in 1.3. For Django's own
test suite there was a big push during the 1.3 cycle to rewrite all doctests
as unit tests, and although doctests in apps are still fully supported,
there's a general consensus among the core team that unit tests are a better
tool, so the sample doctest was removed in 1.3 in order to encourage users
also more towards unit tests than doctests. But as I said doctests are still
supported for apps, so all the sample doctests in the book can still be
tried even in more recent Django versions.


> In some quick review of the 1.2 doc, it seems like perhaps there are
> other changes as well.


The biggest change in testing between 1.1 and 1.2 was that 1.2 introduced a
new feature to allow easier creation of custom test runners. In the part of
the book that discusses this topic, that is mentioned.

There are bigger changes with 1.3, with the introduction of unittest2. But
the fundamentals of testing that the book attempts to convey are still the
same, it just won't be able to point out some of the newer features that are
now available.

There is no update of the book (nor anything planned). It was written during
the 1.2 development cycle. The last chance I had to make any changes to the
text was when 1.2 was in late beta, and that is when I did add notes about
things that had definitely changed between 1.1 and 1.2 (like the custom test
runner stuff).

Karen
-- 
http://tracey.org/kmt/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to