[TIP] loading test data into frameworks
chris at simplistix.co.uk
Fri Jan 14 06:23:00 PST 2011
On 14/01/2011 14:14, Phlip wrote:
> [ please set the reply-to to testing-in-python@ !]
This is for the list manager. Some might just say "stop being lazy" ;-)
> The number one problem with all the test fixture systems I ever
> auditioned for Django models was unbelievable slowness.
Maybe read a little before diving in at the deep end with your rant ;-)
The package I released is not for setting up models in any particular
web or persistence framework, it's a collection of tools and mock
objects that I've found useful when writing tests against many different
> Thats' a major bummer for TDD, because you should integrate after
> every few edits, and a slow integration derails your flow. On a
> project with 500 tests the complete run could be 5 minutes.
Yeah, that's crazy. All 533 of testfixtures own test suite run in 0.4
> I was using farmdev's fixture system, and it was incredibly slow. It
> also did not use raw SQL. It fully resolved all records into model
> objects, and called save() on them.
This sounds reasonable to me. If you're pushing that much data around
that it's causing you problems, I'd suggest you might be requiring too
much data in your tests...
> I rewrote the fixture loader, going direct to SQL, and got a major speed boost.
Cool, did you feed it back to the original package so that everyone
could benefit from your work?
> Anyway thanks for the library, but you can see I can't use its fixture
Had you bothered to read, you would have found no such thing...
Simplistix - Content Management, Batch Processing & Python Consulting
More information about the testing-in-python