[TIP] why you should distribute tests with your application / module

Jesse Noller jnoller at gmail.com
Wed Sep 17 08:42:09 PDT 2008


On Wed, Sep 17, 2008 at 11:06 AM, Kumar McMillan
<kumar.mcmillan at gmail.com> wrote:
> On Tue, Sep 16, 2008 at 3:07 PM, Jesse Noller <jnoller at gmail.com> wrote:
>> On Tue, Sep 16, 2008 at 3:49 PM, Pete <pfein at pobox.com> wrote:
>>> What about fixture data though?  That can easily get larger than the
>>> size of the rest of your distribution...
>>>
>> Why not generate the fixture data on the fly though?
>
> This is a good point about distributing fixture data.  I can see for
> an audio based package you might have wav files in your test suite
> that you probably wouldn't want to distribute.  As for generating
> fixtures on the fly, there could be a speed penalty for large datasets
> that would otherwise do just fine in a static text file.  However, I
> think in most cases fixture data is pretty small and zip does a good
> job at text compression.  Distributing fixtures is probably ok most of
> the time.
>
> K
>

As far as speed penalty - which would you rather deal with, checking
in large static blobs of test data alongside your tests (a hack) or
taking a potential speed penalty (you can speed it up by generating
the data concurrently) to make your tests self-sufficient?



More information about the testing-in-python mailing list