TrialHandler[2|Ext] test(s)

33 views
Skip to first unread message

Jeremy Gray

unread,
Feb 14, 2016, 3:49:26 PM2/14/16
to psycho...@googlegroups.com
I am a little unsure of the differences among Trialhandle, Trialhandler2, and TrialhandlerExt.

We do not appear to have a test covering TrialHandlerExt. Can I simply duplicate the test for TrialHandler? If I change the last line of the test as shown below to be 

    trials = data.TrialhandlerExt(..)

then the test as written for TrialHandler passes. 
def test_random_data_output(self):
...
trials = data.TrialHandler(trialList=conditions, seed=100, nReps=3,
method='random', autoLog=False)
TrialHandler2 has weights and other stuff. The test_random_data_output() says it is not currently testing things because it can't do so properly.

--Jeremy

Jonathan Peirce

unread,
Feb 15, 2016, 4:51:54 AM2/15/16
to psycho...@googlegroups.com


On 14/02/16 20:49, Jeremy Gray wrote:
I am a little unsure of the differences among Trialhandle, Trialhandler2, and TrialhandlerExt.

TrialhandlerExt was contributed by someone wanting weighting options, and wasn't sure about adding to TrialHandler
TrialHandler2 is a rewrite of TrialHandler using a cleaner data storage and as-you-go creation of the trial order. I think this should ultimately replace TrialHandler but I haven't had enough time battle-testing it.


We do not appear to have a test covering TrialHandlerExt. Can I simply duplicate the test for TrialHandler? If I change the last line of the test as shown below to be 

    trials = data.TrialhandlerExt(..)

then the test as written for TrialHandler passes.
Sounds good.

def test_random_data_output(self):
    ...
    trials = data.TrialHandler(trialList=conditions, seed=100, nReps=3,
                              method='random', autoLog=False)
TrialHandler2 has weights and other stuff. The test_random_data_output() says it is not currently testing things because it can't do so properly.
You mean Ext has weights? I don't think I added that to TrialHandler2, although it is my mind that it should be there

Jon


This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.

Jeremy Gray

unread,
Feb 15, 2016, 9:34:36 AM2/15/16
to psycho...@googlegroups.com
Ok, cool. I copied the test for TrialHander to re-use for TrialHandlerExt. With one small fix to the code in TrialHandlerExt, the tests pass. The tests do not further test that weights are working correctly, etc. (Yes, weights are only in ...Ext, my typo earlier).

I'll go ahead and commit the new test and minor fix as part of the style refactoring. (In general, we have been merely noting things as we find them, rather than making functional changes.)

--Jeremy


--
You received this message because you are subscribed to the Google Groups "psychopy-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages