[vtk-developers] VTK-Python testing: update.

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Wed Sep 11 21:29:05 EDT 2002


>>>>> "BG" == Berk Geveci <berk.geveci at kitware.com> writes:

    BG> I would go with command line arguments. In Tcl, it is like:
    BG> test -D path/to/data/dir -V relative/path/to/data/dir/filename
    BG> (I think Bill also added support for -B path/to/baselin/root).
    BG> This gives more flexibility to the test writer in that the
    BG> filename does not have to be hardcoded. Multiple files are
    BG> differentiated by a number trailed by underscore (volProt.png,
    BG> volProt_1.png...). The images are compared until the first
    BG> match is found. If all comparisons fail, the difference with
    BG> minimum error is reported (and the corresponding images are
    BG> used by Dart).

Thanks for feedback again.

The only objection you have is that there is more flexibility given to
the test writer.  I think that there is no flexibility given to the
test writer in this case because everything is fixed.  If a testcase
is going to generate 10 images say img_1.png, img_2.png
... img_10.png.  Now lets say the test writer decides that the
img_2.png image is not necessary or wants to drop the test.  If you
force img_%i.png on the test you'd have to not only remove img_2.png but
rename the rest.

Also, comparing each image till the best match is found is inefficient
unless there are gradations of success and you are trying to measure
them.

Besides, the image name has to be fixed somewhere anyway, why not in
the script instead of outside it?  I dont think other test writers
would have difficulty with that because they'd know what image names
are already used and if folks use descriptive names there should be no
problem at all.

Also, its not asif the Python test arguments need to be the same as
Tcl and Cxx.  The testing approach is different for different
languages so why not admit some more differences?  Dart also doesn't
seem to have any issues with this.

So I fail to see why fixing the image file name outside is any benefit
at all.

cheers,
prabhu



More information about the vtk-developers mailing list