[TIP] why you should distribute tests with your application / module
jnoller at gmail.com
Tue Sep 16 13:07:50 PDT 2008
On Tue, Sep 16, 2008 at 3:49 PM, Pete <pfein at pobox.com> wrote:
> On Sep 16, 2008, at 1:50 PM, Kumar McMillan wrote:
>> I've stated my opinion before that I think tests should be distributed
>> with a python app / module and was surprised to face opposition to
>> that idea. Today, I saw one of the most succinct summaries about why
>> distributing tests is such a good idea:
> I'm in favor too. In my case, I'm also providing some base classes
> for writing tests that may be useful to a user.
>> What do you lose by distributing tests with your package? 10k of disk
>> space? I can't think of anything else.
> 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? For example, you
can easily generate file data on the fly (that will always be the
same) each time a test is run - I do this with file sizes ranging from
1 mb to 100s of gigabytes. This way I don't need to check in test
data, or store it. I just generate it from the ether. The same applies
to database/fixture data - why not generate it from some seed/ID on
More information about the testing-in-python