This site is an archive; learn more about 8 years of OpenHatch.

[Devel] Upgrading to Django 1.2 -- help us fix the tests, and push this out

Asheesh Laroia asheesh at openhatch.org
Tue Sep 28 13:50:47 UTC 2010


Excerpts from Asheesh Laroia's message of Mon Sep 27 17:06:04 +0000 2010:
> Excerpts from Asheesh Laroia's message of Mon Sep 27 16:02:50 +0000 2010:
> > Hey all,
> > 
> > Do you want to help OpenHatch run the latest and greatest Django code? This
> > should speed up the test suite and bring us a whole bunch of other improvements.
> > 
> > Here's what you need to know:
> 
> I realized that it might not be totally clear how to run and fix the 
> test suite. If you have questions about how the test suite works or can 
> be fixed, come find me on IRC or reply to this email. My goal is to have 
> a clear web page explaining that, somewhere on the wiki.

Jack Grigg pointed out some problems on IRC:

<pythonian4000> paulproteus, when you are around: Got your devel email and thought I would just check the tests did pass. 
Running "./bin/mysite test" results in an ImportError - http://pastebin.com/6XDrHi35
<pythonian4000> paulproteus
<pythonian4000> paulproteus: Running "./bin/test_sans_customs" gives six errors related to MySQL data truncation and a 
TwillAssertionError that couldn't find you ^_^ - http://pastebin.com/Eb8hkfCR
<pythonian4000> paulproteus: Ran "./bin/test_sans_customs" to check nothing was intermittent, get same errors.
<pythonian4000> paulproteus: Hmm, "./bin/mysite test customs" doesn't fail immediately. I'll go through and test all the 
individual folders and see if I can find where the import problem is coming from...
<pythonian4000> "./bin/mysite test account" - OK

(he's pythonian4000 and I'm paulproteus)

The TwillAssertionError that Twill can't find me... well, I guess it's high time that we have a 
tutorial up on how to diagnose TwillAssertionErrors. But basically, what you need to do is 
call the Python debugger from the test code (write "import pdb; pdb.set_trace()" on one line) 
and then use pdb and Twill commands to diagnose.

More on pdb: http://docs.python.org/library/pdb.html

More on Twill commands: http://twill.idyll.org/python-api.html

I just fixed the dependency error that Jack wrote about in the pastebin, so if you take a fresh
look at the origin/django12 branch you'll find I added a new dependency to buildout.cfg; run
./bin/buildout and things should be better.

Zathraz also noticed (and I fixed) a bug related to data trunction, so I wonder if those are fixed
now too. Actually, no -- this Timestamp thing is a real bug that persists. That we should definitely
fix. Maybe you can write a patch for that, first?

You can run just one test by doing (for exammple):

./bin/mysite test base.TimestampTests

Or this, if you want them to use SQLite (and therefore run faster):

./bin/sqlite_mysite test base.TimestampTests

Whee,

-- Asheesh.


More information about the Devel mailing list