[rkward-devel] rkwardtests & docs

meik michalke meik.michalke at uni-duesseldorf.de
Mon Nov 1 17:23:37 UTC 2010


hi,

am Montag 01 November 2010 (13:07) schrieb Thomas Friedrichsmeier:
> But in fact, this should probably be part of rktests.runRKTest[Suite]() to
> keep the tests themselves slim. Of course the follow up problem is that
> using relative paths to read in data files will not work for the import
> plugin tests, so weed need an additional function to locate the test-source
> directory.

ok, i've tried something different. all tests are now run in the temp suite 
dir by default, so any output goes there as well. as for the problem of 
loading files, the class "RKTest" gained a new slot called "files" for those. 
just define them relative to the test standard folder. they will be copied to 
the temp dir and can then be used by their simple file name.

probably see the import_spss or import_stata tests for reference. to me that 
seemed to be the easiest solution, especially from the perspective of a test 
writer.

> Either way, the core of the problem is in read.spss() / read.dta(), not in
> our plugin code, so to some degree it is a false alarm.

ok, i thought so, too. at least i didn't break it...

> > last but not least, an error from "plot_history_basics" in
> > "rkward_application_tests.R":
> > 
> > <error>
> > Error : rk.record.plot$sP.length == 6 is not TRUE
> > </error>
> 
> I don't see this one with R 2.12.0, lattice 0.19-15.

i can't even reproduce it myself today: this error strangely disappeared over 
night...

however, i found something new ;-) until now each test run left an object 
called "suite" in .GlobalEnv, which was created by a source() call in 
"rktest.makeplugintests.R", line 47. it took a while until i managed to make 
all functions run without that global object in place, that is, the mentioned 
source() call is now called with the parameter "local=TRUE", so the "suite" 
object is created only in the test function environment. this works great, 
with one exception: it seems to break the "active_binding" test in 
"rkward_application_tests":

<error>
Error in bindingIsActive(\"active.binding\", rkward::.rk.watched.symbols) :
   no binding for \"active.binding\"
</error>

this still happens even after i sourced the R file manually, so "suite" is 
actually present in .GlobalEnv, and then run

rktest.makeplugintests("rkward_application_tests.R", test.id="active_binding")

but the error doesn't occur if "local=TRUE" is removed again (it's FALSE by 
default). frankly, i don't get it. any idea how that affects this very test? 
has it something to do with the reference to rkward::.rk.watched.symbols?


viele grüße :: m.eik

-- 
dipl. psych. meik michalke
institut f"ur experimentelle psychologie
abt. f"ur diagnostik und differentielle psychologie
heinrich-heine-universit"at 40225 d"usseldorf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20101101/102ae5e7/attachment.sig>


More information about the Rkward-devel mailing list