Testing functions in ./private subdirectory
pr.nienhuis at hccnet.nl
Thu Apr 18 14:20:25 CDT 2013
Given this discussion:
and as a corollary of , this bug report:
about failure to run tests in functions scripts in ./private subdirectories
for Octave-Forge packages, I was wondering if this issue has ever been
considered in some detail by the Octave developers community before.
A. IMO it is quite useful to have tests for functions living in ./private
subdirs as well, also for OF packages.
B. Indeed, when functions live in ./private directories, they're not in the
PATH and a test script won't find them (obviously, provided that the
testscript is written so that it'll only look in the PATH).
In  and  it is suggested to move test blocks of functions in ./private
to other functions in the ./inst directory (we're talking about OF here).
I'm less inclined to be in favor of this, as I think tests should be kept
together in one place with the function they're supposed to test. IMO,
having bits and pieces of functions scattered around various places doesn't
help keeping code transparent and easy to manage.
I would rather think it more logical for a test script to temporarily extend
the PATH with ./private subdirs if it finds those.
Now the Debian devs asked me to apply their solution (=moving test blocks)
to functions in the ./private subdir of the io package so that the tests for
those ./private/<functions> can be run by their test script.
I'm hesitating because I think it's rather their test script that has to be
improved to look in ./private subdirs as well. And maybe/probably for core
Octave a solution already exists (? I think so)
So: what's the opinion of the Octave devs?
View this message in context: http://octave.1599824.n4.nabble.com/Testing-functions-in-private-subdirectory-tp4652034.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.
More information about the Octave-maintainers