Paul,

One thing to think about is why that object is expensive to create and
whether it can be done another way. I don't know anything about the
object you want to test, but I find that if a test is expensive,
that's because:

1. The test relies on external resources -- database, filesystem,
network -- and I might be better off writing a mock object to simulate
those resources.
2. The test relies on extremely complex setup, and I might be better
off trying to break the object down into smaller parts so I can test
its interactions in isolation.

I find that when testing gets hard, or slow, I do less of it, and then
inevitably I end up regretting that laziness later ... So I try to do
the up-front work to make testing fast and easy, so I can always do
lots of it without feeling like I'm forcing myself.

Francis

Paul Brannan <pbrannan / atdesk.com> wrote in message news:<20030401183531.GK24880 / atdesk.com>...
> I have a number of tests that create some object.  The tests are not
> unit tests, but I am using a unit test framework (RUNIT or Test::Unit)
> to write the tests.  This object is expensive (time-wise) to create, and
> I would like to share the object between my tests.