Menu

#2 Don't run setUp so often

closed
7
2002-12-16
2002-12-13
No

We need to avoid using setUp and tearDown so much,
and to give the users more control over this (as
suggested by David). Certainly if the method is not
passed any arguments (as in a static method with no
arguments) there is no need to call setUp and
tearDown. Along these lines, if we broke setUp into
several methods, one per type of data, we would only
need to call setUp for the data that was actually used in
a loop, and not pay for setting up all data. We could
also let the user tell us (through a global variable?)
whether we can assume that the different elements of
the data arrays share any storage that is mutated; if
not, then we don't need to do a setUp between uses of
different elements of an array. The ultimate flexibility
here would perhaps be to let the user write a setUp that
is specific to each point in the loop that might need
some initialization; but perhaps just using flags would
be flexible enough.

Discussion

  • Gary T. Leavens

    Gary T. Leavens - 2002-12-16

    Logged In: YES
    user_id=633675

    We have implemented the suggestion that we need to only call
    a setUp method (now called init_X) for the data actually
    used. This essentially fixes this feature request.

     
  • Gary T. Leavens

    Gary T. Leavens - 2002-12-16
    • status: open --> closed
     

Log in to post a comment.