[TIP] loading test data into frameworks
phlip2005 at gmail.com
Fri Jan 14 11:04:48 PST 2011
> 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...
Nope. <10 major records with <30 leaf records.
I'm talking about a yearlong project with a megaline of Django code
and the default loader, and then my current project with fixture. Test
cases without fixtures, that feebly loaded their own model objects,
were 10x faster than cleanly written test cases that used either
fixture package. Like I said, that seriously impaired TDD and
Thanks for letting me vent!
>> I rewrote the fixture loader, going direct to SQL, and got a major speed
> Cool, did you feed it back to the original package so that everyone could
> benefit from your work?
Sorry, it's a stereotypical model and I didn't burn up any time
productizing its loader!
(No, the stereotypicality did not provide the speed boost! Come to
think of it I'm not sure _what_ did...)
>> 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...
More information about the testing-in-python