octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Testing functions in ./private subdirectory


From: PhilipNienhuis
Subject: Testing functions in ./private subdirectory
Date: Thu, 18 Apr 2013 12:20:25 -0700 (PDT)

Given this discussion:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672756 [1]

and as a corollary of [1], this bug report:
http://savannah.gnu.org/bugs/index.php?38755 [2]

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 [1] and [2] 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?

Philip




--
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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]