Re: Question about "Django 1.1 Testing and Debugging" Book for Karen

2011-04-29 Thread Margie Roginski
Hi Karen,

Ah, very sorry - my mistake!  The machine I was using had an old
version of python and it was using django 1.0.  So that's why it
didn't create tests.py, and I just assumed there must be a bunch of
changes between 1.1 and 1.2.

Ok, mystery solved.  Thanks for your explanation of the differences, I
will look out for those.  I'm sure I'll learn a lot from your book.
I've just completed a large django project and am moving onto my first
real position in web application development (using django of course)
at a new company.  Previously I was in a different field of software
and created a django product to bootstrap myself on web app
development there.   The one thing I feel that I could have done
better on my recent project was my testing.  I used selenium
extensively (and that did work well for me), but I did not test from
inside the core django framework much, so I am looking forward to
learning from your book.

Thanks!

Margie

On Apr 29, 4:40 am, Karen Tracey  wrote:
> On Thu, Apr 28, 2011 at 6:18 PM, Margie Roginski
> 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.



Re: Question about "Django 1.1 Testing and Debugging" Book for Karen

2011-04-29 Thread Karen Tracey
On Thu, Apr 28, 2011 at 6:18 PM, Margie Roginski
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.



Question about "Django 1.1 Testing and Debugging" Book for Karen

2011-04-28 Thread Margie Roginski
Hi Karen,

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!

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

I was just wondering if you have any sort of addendum, even in some
informal form that would bring your book up to date with django 1.2.?
Or maybe the changes between 1.1 and 1.2 are just very minor?  I see
something about "class based test runners" in the doc.  I haven't
really had a chance to dive in yet, but just thought I'd ask if you
have any updates you'd be willing to provide.

Thanks,

Margie

-- 
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.