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

Kumar McMillan kumar.mcmillan at gmail.com
Wed Sep 17 11:05:50 PDT 2008


On Wed, Sep 17, 2008 at 12:52 PM, Grig Gheorghiu <grig at gheorghiu.net> wrote:
> --- On Wed, 9/17/08, Pete <pfein at pobox.com> wrote:
>
>>
>> I mean for distribution.  My test dataset falls into some
>> middle
>> ground - it's a few megabytes. Not the gigabytes that
>> would lean
>> towards generation, but still larger than the rest of my
>> source tree.
>> Seems silly to turn a 30K package into a 5M one b/c of test
>> data...
>>
>
> Idea: don't include your test dataset with your source code, but have your test script wget it from some location during the test run. Amazon S3 comes to mind as a very cheap repository for this kind of stuff.

alternatively, you could skip the tests that require the large
datasets when the datasets are not present.  This way the end user can
still run unit tests to determine to some degree whether or not the
installed binary of your package is "working."  In other words, some
tests are better than no tests.

K



More information about the testing-in-python mailing list